By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,044 Members | 1,291 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,044 IT Pros & Developers. It's quick & easy.

Error "cannot update database or object is read-only" when updating MDB file in ASP

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Fie Fie Niles" <fn****@wincitesystems.com> wrote in message
news:eh**************@tk2msftngp13.phx.gbl...
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".


http://www.aspfaq.com/show.asp?id=2009

--
Tom Kaminski IIS MVP
http://www.microsoft.com/windowsserv...y/centers/iis/
http://mvp.support.microsoft.com/
http://www.iisfaq.com/
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://www.tryiis.com
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.