Troubleshooting "Operation must use an updateable query" errors |
|
|
Error:
Solution: Scenario1: Testing on the Web Server If you are testing the program at web-server, your web hosting provider should have a designated folder for databases where correct permissions are already set. You need to move database file to that directory and update connection string accordingly. Example: Let's say you have the following directory structure on you web server: cgi-bin Where: database - designated database
folder Old connection string should look like this: strConnection = "Provider=MSDataShape;DBQ=" & server.mappath("db\db1.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;" New connection string in this example will be: strConnection = "Provider=MSDataShape;DBQ=" & server.mappath("..\..\database\db1.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;" Possible problem: Some Web servers do not allow parent paths. Solution: If parent paths are not allowed you can specify full physical path to database instead. To find where exactly database file resides put the following test.asp file to the root directory and run it in browser. test.asp: <% response.write Server.MapPath("test.asp") %> It should print something like this: W:\Webspace\resadmin\xlinesoft.com\www\test.asp Now open include/dbconnection.asp file in text editor. It should look like this: strConnection = "DBQ=" & server.mappath("..\database\db1.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;" Here is how you need to modify it: strConnection = "DBQ=W:\Webspace\resadmin\xlinesoft.com\database\db1.mdb";Driver={Microsoft Access Driver (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;" Scenario2: Testing Locally If you are testing locally and received the above described error, that usually means that there is a permission problem. To fix that, you need to give full permission to EVERYONE to the directory where database is located. To do that ,you need to:
For Windows XP users only: If permission tab is not enabled or missing or sharing tab does not allow to grant the permission, you need to do the following:
|
| Converted from CHM to HTML with chm2web Standard 2.83 (unicode) |