Note: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace for more information about the error and where the error occurred in the code.
Exception Details: System.Data.OleDb.OleDbException: Could not be removed from the specified datasheet.
SOURCE Error:
Row 37:comm.commandtext = Sqlstr;
Line://comm. Prepare ();
Row 39:cout = Comm. ExecuteNonQuery ();
Line 40:
Line 41:conn. Close ();
The workaround is as follows:
Right-click on the data file *.mdb to open the Properties dialog box, under the ' Security ' tab, you need to add iusr_xxx (XXX is your machine name), that is, add the Internet Guest account, and then set the permissions for this account to be readable and writable. (originally so simple to solve the problem, I:))
If the ' Security ' tab is not found in the Right Key Properties dialog box, you need to remove the ' Use Simple File sharing (default) ' Check in the view under Folder Options.
Reason:
There are several main reasons for the error:
This error occurs when your program attempts to perform an updated database or other similar operation. This is because
ADO is not able to write a database because of several reasons below.
1. The most common reason is that the anonymous user account (Iusr_machine) does not have write access to the database file.
To resolve this problem, adjust the properties of the database file in the organizer so that anonymous users have the correct permissions.
When using an Access database, not only the permissions to write to the file, but also the permissions to write to the directory, because
Jet needs to create a. ldb file in this directory.
2. The second reason is that the database is not open with the correct mode. You should open it using the following method.
SQL = "UPDATE products Set UnitPrice = 2;"
Set Conn = Server.CreateObject ("ADODB. Connection ")
Conn.mode = 3 ' 3 = adModeReadWrite
Conn.Open "MyDSN"
Conn.execute (SQL)
Conn.close
Note that the default mode is set 0 (adModeUnknown), which is allowed to be updated.
3. It is also possible to select the Read-only option for this DSN in the ODBC Administrator.
4. You are updating the fields in two tables at the same time, this error message appears, and the solution is to update it separately
The respective fields in the two tables.
5. When you use a load from a lower version (such as access2.0,access7.0) to a higher version (ACCESS 2000)
This error occurs when you execute the query in.
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.