I have created an Access database, with a "Users" table with fields: "personname", "surname", "email", "username", "password", "secretQuestion", "answer".
I am getting a count field incorrect error when i process this:
Please tell me if I did something wrong here, because I don't know and I am ready to
First, your SQL INSERT statement doesn't use the correct syntax. Look here for a page which describes the correct syntax. (You didn't use parentheses.)
Second, constructing an SQL statement that way is error-prone and risky. For one thing, if any of the string values contain quotes -- and they could -- then the result is not valid SQL. And for another thing, it's possible for evil users to uses that statement for "SQL Injection" attacks; humorous example here.
The cure for both of those problems is to use PreparedStatement; you should find that in any reputable JDBC tutorial.
Joined: Apr 19, 2011
Thanks alot guys, I appreciate the help alot. I am using PreparedStatement now aswell as MySQL server. I was having endless issues with MS Access and Win 7 64-bit aswell. Everything is working 100%.