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

Ms Access database error."Could not update.Currently Locked"

P: 2
Hi,
I wrote a VB6 program to read some data records from a Ms Access database and to write them into a SQL server database.(I use Ms Access 2000 and SQL server 2000).After reading each record in Access database, I update a text type datafield of that record in Access database to 'Y' (to mark the perticular record as a copied record)(The program does the updation). I tested the program several times by using a seperate copy of the same database each time. Sometimes it worked ok. But randomly it gave an error "Could not update. Currently locked". Again some times it worked ok. I can't understand why this error comes at random times.
What is this error? How can I correct this?

The recordset opening method I used is :
rs.open sSQL , dbConn, adOpenStatic, adCmdTable

For some recordsets I used the method :
rs.open sSQL , dbConn , adOpenStatic, adLockOptimistic

rs:- the recordset
sSQL:- the SQL statement to select the records
dbConn:- the database connection

Is there something wrong with the recordset opening methods?

Can anyone please help me ......

Thanks,
amindi.
Aug 29 '06 #1
Share this Question
Share on Google+
1 Reply


PEB
Expert 100+
P: 1,418
PEB
Hi,

Maybe if your code have already functionned maybe the problem isn't in your code
Maybe you open the database exclusively and one time opened the database is locked for others!

There is also a possibility for locking! If there is a problem with the ldb file of the database! If a suitable ldb file isn't created when the database is open you can't open it at the same time from other instances!

Have a nice luck!
Sep 2 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.