Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to update records in my database but am continually get a error saying that the database or object is read only. Can anyone please tell why this is so - it is driving me crazy!
I have included the adovbs.inc file and I am using an access2000 database
here is my code
---------------------------------
connectionstring
----------------------------------
Function openDB()
dim dcnDB, filepath
filepath = Server.MapPath("/Service Directory/Service Directory.mdb"
set dcnDB = Server.CreateObject("ADODB.Connection"
dcnDB.Connectionstring ="provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filepath
dcnDB.open
set openDB = dcnDB
End Function
----------------------------------------------------------------------------------------------------------------------------------------
record set
------------------------------------------------------------------------------------------------------------------------------------------
set objRSpassupdate = Server.CreateObject("ADODB.Recordset"
objRSpassupdate.open "organisationbody", openDB, adopenKeyset, adLockoptimistic objRSpassupdate("organisationbodyname" = usernamecheck
objRSpassupdate("password" = passwordcheck
objRSpassupdate.Update
objRSpassupdate.close
openDB.close
the error I am getting is:
Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/service directory/login.asp, line 45
I have included the adovbs.inc file and I am using an access2000 database
here is my code
---------------------------------
connectionstring
----------------------------------
Function openDB()
dim dcnDB, filepath
filepath = Server.MapPath("/Service Directory/Service Directory.mdb"
set dcnDB = Server.CreateObject("ADODB.Connection"
dcnDB.Connectionstring ="provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filepath
dcnDB.open
set openDB = dcnDB
End Function
----------------------------------------------------------------------------------------------------------------------------------------
record set
------------------------------------------------------------------------------------------------------------------------------------------
set objRSpassupdate = Server.CreateObject("ADODB.Recordset"
objRSpassupdate.open "organisationbody", openDB, adopenKeyset, adLockoptimistic objRSpassupdate("organisationbodyname" = usernamecheck
objRSpassupdate("password" = passwordcheck
objRSpassupdate.Update
objRSpassupdate.close
openDB.close
the error I am getting is:
Error Type:
Microsoft JET Database Engine (0x80040E09)
Cannot update. Database or object is read-only.
/service directory/login.asp, line 45