![]() | Pepper Spray & Stun Gun Specials! KEEP THEM SAFE. | |
| CoverYourASP --> Troubleshooting --> Database connection errors | ||
| Operation must use an updateable query.MSDN references: Q175168 This is a very common error to encounter. Although there are other possible causes, as documented in the MSDN issue above, it has always been reported to me for one reason only - insufficient permission on the database or the folder containing the database. The Internet Guest Account (IUSR_<machinename>) that is used to access files under IIS needs write permission in order to make changes to the database (obviously). Note: In my code, even viewing most pages causes the database to be updated - anything from statistics gathering to incrementing the number of times and article has been viewed. To fix the problem, right click the folder that contains the database, and choose Properties. ![]() The dialog that appears will have a Security tab. Click on the tab to open that page. Highlight the Internet Guest Account in the top pane, and make sure that Write has a check next to it in the bottom pane. The reason that you need to give write permission to the folder, not just the database, is because Access will write a lock file (dbname.ldb) into that folder. That's why you keep your database in a separate folder to other files! ![]() One more thing: Access also uses the temporary folder, as defined by the TMP or TEMP environment variables. If these variables are not defined, Access uses the winnt/system32 folder instead. It is NOT recommended that you add Write permission to that folder, so make sure that you define both TEMP and TMP environment variables, then give the Internet Guest Account (IUSR_<machinename>) write permission to that folder. |
| ||||||||||||||||||||||||||||||||||||||||||||||||