views:

249

answers:

3

I have written some code that uses an Access DB, on my localhost the following - Select, Insert, and Delete queries work just fine and do what I programmed them to do. When I move the application to the staging server, the application throws errors when Inserting and deleting, however the select statements work just fine. I have made sure all permissions are read/write as far as I can tell, does anyone know what I am missing. See the error below.

~~~~~

Description: An unhandled exception occurred during the execution of the 
current web request. Please review the stack trace for more information about
the error and where it originated in the code. 

Exception Details: System.Data.OleDb.OleDbException: Could not delete from
specified tables. 

Source Error: 
Line 714: OleDbDataReader objReader; 
Line 715: objConn.Open(); 
Line 716: objReader = objCmd.ExecuteReader();
A: 

Hmmm ... that's odd. Do you have Modify (Change) file system permissions on the staging server's folder? Hitting the .mdb would create that temp Access file, so if you can select you should have Write on that folder. Check that you have Modify.

HardCode
Thanks that was it, I missed the modify check box.
akulla3D
A: 

Is your MDB file readonly? I am talking about the file-system attribute of the MDB file.

shahkalpesh
A: 

Seems like whatever account is utilizing the .mdb file does not have the necessary rights to the file/folder.

I've found that using an .mdb file for a website just has too many problems. You want to switch to at least SQL Express. You website will appreciate it.

Jeff O