ACCESS Database reserved words are used with caution, and access database is used with caution

Source: Internet
Author: User

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!


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.