Why is an error message reported when dynamic SQL statements are executed in ASP? Prompt statement syntax error

Source: Internet
Author: User

Q: Why is an error message reported when dynamic SQL statements are executed in ASP? Prompt statement syntax error
A:
When aspuse conn.exe cute (SQL) is used to query, update, and insert Access database data, the correct statements often display SQL statement errors, which are quite annoying, you can add "[" and "]" to the field to solve the problem: CopyCode The Code is as follows: Example 1: Select * from
If an error occurs, you can change it to select * from [a].
Example 2: update [user] Set Password = '"& data1 &" 'where secname =' "& data2 &"'"
If an error occurs, you can change it to update [user] Set [Password] = '"& data1 &" 'where secname =' "& data2 &"'"
Example 3: insert into mybook (name, by, mobile) values ('"& data1 &"', '"& data2 &"', '"& data3 &"')"
If an error occurs, you can change it:
Insert into mybook ([name], [by], [mobile]) values ('"& data1 &"', '"& data2 &"', '"& data3 &"')"

Q: Why does the prompt "Microsoft Jet Database Engine (0x80040e09)" always fail to be updated, and the database or object is read-only? copy the Code the code is as follows::
if you run an ASP Program on a Windows + IIS server, the database may fail to be updated. The specific error message may be:
1. Microsoft Jet Database Engine (0x80040e09) cannot be updated. The database or object is read-only
2. The Microsoft ole db provider for ODBC drivers (0x80004005) [Microsoft] [ODBC Microsoft Access driver] operation must use an updatable query.
3. Microsoft Jet Database Engine (0x80004005) must use an updatable query.
solution ):
A. Right-click the wwwroot folder and choose "properties"> cancel "read-only"
This method is the simplest and occasionally valid
B. in your database file on the top of the folder, right-click "properties"-"security"-Add User: "IUSR _ computer name" and "IUSR _ computer name" read and write permissions
This method is the best solution to this problem currently, generally, the problem can be solved.
you may not be able to right-click the XP system to see the "Security" option, open "Tools"-"Folder Options"-"View"-cancel "simple file sharing (recommended) "Then you can find the" Security "option in properties
C. Right-click the wwwroot folder and choose" properties ">" Web Sharing ">" shared folder "
D. this is the current solution to this problem, if there is anything to add, please contact http://www.venshop.com mortal Network

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.