Hi, every time I run the below statement, it display error message "Could not Update , currently lock by other session in this computer.
I am running on a stand-alone PC. - Dim rst As New ADODB.Recordset, sqlstmt As String
-
-
sqlstmt = "SELECT * from tblvndprod where productID=" & Me.ProductID
-
-
rst.Open sqlstmt, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
-
-
With rst
-
If Not .EOF Then
-
![Unit] = Me.UnitMeasurement
-
.Update
-
End If
-
End With
-
-
rst.Close
-
Set rst = Nothing
3 2160
Hi, every time I run the below statement, it display error message "Could not Update , currently lock by other session in this computer.
I am running on a stand-alone PC.
Dim rst As New ADODB.Recordset, sqlstmt As String
sqlstmt = "SELECT * from tblvndprod where productID=" & Me.ProductID
rst.Open sqlstmt, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
With rst
If Not .EOF Then
![Unit] = Me.UnitMeasurement
.Update
End If
End With
rst.Close
Set rst = Nothing
I realize I have a tab control form which consist of Page 1 and Page 2.
If I do an update on Page 1, while Page 2 is open, error message occur.
Bit, If I remove Page 2, everything work well. Is there anyway I could temporary
disable or close the table on Page 2 without removing page 2 ?
NeoPa 32,556
Expert Mod 16PB
As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).
This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.
Please use the tags in future.
ADMIN.
NeoPa 32,556
Expert Mod 16PB
Hi, every time I run the below statement, it display error message "Could not Update , currently lock by other session in this computer.
I am running on a stand-alone PC. - Dim rst As New ADODB.Recordset, sqlstmt As String
-
-
sqlstmt = "SELECT * from tblvndprod where productID=" & Me.ProductID
-
-
rst.Open sqlstmt, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
-
-
With rst
-
If Not .EOF Then
-
![Unit] = Me.UnitMeasurement
-
.Update
-
End If
-
End With
-
-
rst.Close
-
Set rst = Nothing
The first thing that jumps out is that .Update is a DAO (not ADODB) function. Your Dim line declares the recordset as ADODB.
Also, a .Update must follow a .Edit. Your code has no visible .Edit.
The multi-page issue may well be a part of this also (seems likely) but clear away the obvious before trying to sort out the less so.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Aaron Davies |
last post by:
I'm developing a collaborative whiteboard, in which all objects
(shapes, clip art icons, etc.) are synchronized between all
participants in a session. It's working well, but I'm running into a...
|
by: Fie Fie Niles |
last post by:
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...
|
by: Ray |
last post by:
I am having my first experience using BLOB as a row in a table. I am
using it to insert graphics for labels we print. I have no problem
inserting into and select from the table. The graphic is...
|
by: Anastassios Giannaras |
last post by:
Hello
I have made an small access Database that is used by 4-5 people every
day. Very often through the users get the message "Could Not Update;
Currently Locked" There is an entry about that...
|
by: David W. Fenton |
last post by:
A very old app of mine that's been in production use, and largely
unchanged since about 1998 has started recently throwing error 3188
(can't update, locked by another session on this machine) when...
|
by: Mark Reed |
last post by:
Hi All,
I'm having a problem with the following code. I've read quite a lot of
old posts regarding the issue but none seem to affer a solution.
The scenario is. I have a bound form which...
|
by: misterutterbag |
last post by:
Hi.
Given the following:
----------------
String lockSubscriptionQuery =
"SELECT subscriptionId FROM subscription WHERE subscriptionId = ?
FOR UPDATE";
pStmt =...
|
by: Access Programming only with macros, no code |
last post by:
ERROR MESSAGE:
Could not update; currently locked by another session on this
machine.
BACKGROUND
I have the following objects:
Table1 - HO (which has about 51,000+ records)
Table2 -...
|
by: jamesnkk |
last post by:
Hi, I am using ADO, sometime I got an error message Could not update currently lock, and sometime I don;t . Error stop in last sentence "Rsumm.Update" , Before exit the program I have use...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |