I don't know whether this question fits here or not, but if it doesn't let me know. I'm a much much beginner in programming, and I've started it in vb.net for a project I've to do for my college work.
To add the data of a user in the database through a form in visual studio, when I fill the values for the fields in the user's form, I'm having a "Syntax Error in INSERT INTO statement" error for adding the entries in the access database when I click the button.
After looking at a solution on this website (https://www.daniweb.com/programming/software-development/threads/489939/inserting-data-into-two-separate-tables-in-an-access-database#), I change the code to this one below:
But it still doesn't work and gives the error:
In the database, the UsersTable has a UserID column with datatype 'AutoNumber' and all the other columns mentioned in the sql query code above, and the table is completely empty.
The LoginTable has the same UserID column with datatype 'Number'and the username and password columns. This table is also completely empty.
The UsersTable is linked in relationships with LoginTable through the UserID, Username and Password columns.
How can I add the data of a user in both the tables at one go?
Please help me as soon as possible!