I have IIS installed on XP Professional workstation machine. I have an ASP
page that open connection to an Access database, then when trying to update
the database, it gave me the error "cannot update database or object is
read-only". This is a workstation machine, not connected to any other
computer, and I login to the PC using an administrator account. I already
check the .MDB file is NOT read-only. But, I do not see the .LDB file.
Manually, I can update the .MDB file, and I can create a new file on the
directory where the MDB file is. The directory where the MDB is located says
"read only", then I uncheck the read only, click apply and OK. When I go
back to the property of the directory, it went back to "read only". This
seems to happen on any XP machine. But, I can still manually create a new
file, delete a file, rename a file on this directory.
The MDB file used to have a password, when it did, I got the error on the
statement
sds("SECURITY_EXTRA1") = sExtra
When I got rid of the password, I got the error on the statement
sds.update
How can I fix this problem ? Thank you.
Here are my codes:
Set dbConnection = Server.CreateObject("ADODB.Connection")
session("CustomersDB_ConnectionString") = "dsnName"
Session("CustomersDB_RuntimeUserName") = "userId"
Session("CustomersDB_RuntimePassword") = "passw"
dbConnection.Open Session("CustomersDB_ConnectionString"),
Session("CustomersDB_RuntimeUserName"),
Session("CustomersDB_RuntimePassword")
Set sds = Server.CreateObject("ADODB.Recordset")
sds.ActiveConnection = dbConnection
sds.CursorType = adOpenKeyset
sds.LockType = adLockOptimistic
sds.Source = "select SECURITY_ID,SECURITY_EXTRA from SECURITY where
SECURITY_USERID = 'abc'"
sds.Open
sds("SECURITY_EXTRA1") = sExtra
sds.update