I need to add some common details in more than two tables.
ugad = "INSERT INTO Ugadmissiontable(Ugname,Ugdob,Uggender)
this adds the info to Ugadmissiontable
And i need to add the some of the datas into department details
ugad = "INSERT INTO" & dept
& "(Ugname,Ugdob,Uggender,Ugage,Ugdept,Ugcoursejoined)"
So i have stored the Department (from drop down list box) and assigned it to Dept.
So i guess dept would have Csc if i choose csc and commerce if i hoose commerce.
When I checked with breakpoint it s workin. Datas are added perfectly. But they are not visible in that respective table
+1 about the sql injection attack. Generally speaking, constructing SQL commands like this bad practice. Look into “parameterized queries” for details on better ways to handle this.
But, given what you’ve posted, one thing to check is the command
There’s no space after INTO before the “, so your actual command could end up being
which would be invalid SQL