ACCESS Database reserved words are used with caution, and access database is used with caution
Today, I have been looking for a solution to the following errors. The final solution surprised me. It took me one afternoon to get started .....
A simple insert statement as follows always prompts the following errors,
You can execute the statements in the ACCESS backend database. The statements can be inserted normally.
Insert into Member (CompanyName, Address, Email, Phone, Person, Audit, Password, CreateDate) VALUES (@ CompanyName, @ Address, @ Email, @ Phone, @ Person, @ Audit, @ Password, @ CreateDate)
If it is suspected that the OleDbHelper class has a problem, but other statements can be inserted. I searched a lot of posts on the Internet and did not say anything about them, just now, a netizen suddenly found that the reserved words of ACCESS should be enclosed in brackets.
To change the statement to the following:
Insert into Member (CompanyName, Address, Email, Phone, Person, Audit, [Password], CreateDate) VALUES (@ CompanyName, @ Address, @ Email, @ Phone, @ Person, @ Audit, @ Password, @ CreateDate)
Execution successful!