Patrick Thorpe
Patrick Thorpe

Reputation: 370

SQL query syntax error using INSERT INTO

So, I know my code for the database connection and reader is functional, because it has worked for me many times before, however, something about this SQL query: enter image description here gives this error message: enter image description here

when this data is inputted: enter image description here This is the database table that I am trying to add the data to: enter image description here

Upvotes: 2

Views: 181

Answers (1)

jmcilhinney
jmcilhinney

Reputation: 54417

The issue is that you are using "password" as a column name and that's a reserved word in Jet SQL. Either change the name or escape it in SQL code. You do the latter by wrapping it in square brackets [].

Upvotes: 2

Related Questions