473,287 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

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

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
1 7853
PEB
1,418 Expert 1GB
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

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

Similar topics

3
by: Brian Fulford | last post by:
I am trying to deploy a web app with a deployment project since I am including Crystal Reports for .Net. I attached all the merge modules, etc but I am getting a build error when I try to build...
3
by: stash | last post by:
Help - Please! I am trying to run the V8 db2setup script *again* (maybe for the third or fourth time) and it will not re-create the sqllib directory. It always stops with this error: ERROR:Could...
2
by: VB Programmer | last post by:
I created a simple user control and placed it on another page. Often I get this error: "Could not reformat the document due to line 27. The original format was restored." Line 27 in the...
3
by: tony | last post by:
Hello! When I build an exe file that use 6 class library dll I get this error. Could not copy temporary files to the output directory. The file 'MeltPracStorage.dll' cannot be copied to the run...
2
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight...
0
by: CWogksch | last post by:
Hello, Everyone... My name is Chris Wogksch. I have a point of sale application developed in VB6 using MS Access 2003 as the database. I've been running versions of this app for over eight...
0
by: Jon Paal | last post by:
error : "Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'." using VWD 2005 with sqlexpress 2005 I am trying to create membership roles and users......
2
by: Sejoro | last post by:
Hello, I am trying to write a program that opens a file; reads through it; outputs the text; then outputs the number of lines, words, and characters. Problem is, every time I try to compile, no...
0
by: =?Utf-8?B?eHl6X2phdA==?= | last post by:
I have a winodws service which sends email using Domino. The service is installed using System Account but it is not able to send emails and gives following error - Error Message: Notes error:...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.