cabflex
06-24-2003, 11:49 AM
Hi
Im working on a site that entails site users logging in and new users signing up etc, new users' details get added to an access database...
I can view the contents of the database no problem, but when i try to add / delete or update the database, i get the following error :
-------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
-------
As you can see i have set the connection mode to adModeReadWrite, is there something i have forgotten to set in the IIS setup maybe?
this is some of the code im using :
Thanks !
-------
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Mode = adModeReadWrite
DB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("test_db.mdb")
Set RS = Server.CreateObject ("ADODB.Recordset")
strSQL = "SELECT test_table.* FROM test_table;"
RS.CursorType = 2
RS.LockType = 3
RS.Open strSQL, DB
RS.Addnew
RS.Fields("name") = Request.Form("name")
RS.Fields("email") = Request.Form("email")
RS.Update
Response.Redirect "admin_view.asp"
RS.Close
Set RS = Nothing
Set DB = Nothing
Im working on a site that entails site users logging in and new users signing up etc, new users' details get added to an access database...
I can view the contents of the database no problem, but when i try to add / delete or update the database, i get the following error :
-------
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
-------
As you can see i have set the connection mode to adModeReadWrite, is there something i have forgotten to set in the IIS setup maybe?
this is some of the code im using :
Thanks !
-------
Set DB = Server.CreateObject ("ADODB.Connection")
DB.Mode = adModeReadWrite
DB.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("test_db.mdb")
Set RS = Server.CreateObject ("ADODB.Recordset")
strSQL = "SELECT test_table.* FROM test_table;"
RS.CursorType = 2
RS.LockType = 3
RS.Open strSQL, DB
RS.Addnew
RS.Fields("name") = Request.Form("name")
RS.Fields("email") = Request.Form("email")
RS.Update
Response.Redirect "admin_view.asp"
RS.Close
Set RS = Nothing
Set DB = Nothing