Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / October 2005

Tip: Looking for answers? Try searching our database.

Could not update... Macro query VS ADO/VBScript query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bingo - 14 Oct 2005 10:43 GMT
Hi all !

I don't understand this error : "Could not update, currently
locked by <frontend_user> on Machine <theMachine>".

I have a FrontEnd, in which a macro runs query to update linked
tables (in the backend), wit hthe data contained in local tables.
So the macro is something like :
RunSQL : INSERT INTO <linked_table> SELECT * FROM <local_table>
Using transaction : No

There's a lot of data, so the query runs for a long time.

Now, I have a VBScript which runs from time to time, and which
inserts data in the BackEnd using an ADO connection. It looks like
this :
oConn.Provider = "Microsoft.Jet.OLEDB.4.0"
oConn.Open "Data Source=NetworkDrive:\MyBackend.mdb;User
ID=xxx;Password=xxx;Persist Security Info=True;Jet OLEDB:System
database=NetworkDrive:\MySecurity.mdw"
oConn.Execute "INSERT INTO <some_OTHER_linked_table> VALUES
(...)",, adCmdText + adExecuteNoRecords

Whenever I run this script while the macro is running, I get the
above mentionned error !

Notice that this script NEVER updates the same tables as the
macro, and the macro NEVER updates the same tables as the script !

My FrontEnd is configured for shared access, and record-level
locking. Anyway, even if page-level locking occurs, the script
NEVER runs (it should run after some time, when the data is
written by the Macro on anoter disk-page).

What am I doing wrong ?

Thanks a lot !

Arnaud
david@epsomdotcomdotau - 15 Oct 2005 22:01 GMT
Check to see if the linked tables are opening the database
in Exclusive mode.  Check this by opening a table in the
FE, then trying to open the BE file.

(david)

> Hi all !
>
[quoted text clipped - 35 lines]
>
> Arnaud
Bingo - 17 Oct 2005 08:34 GMT
David,
Thanks for helping.
I can open a table in the FrontEnd, then open the backend and add
a record. No error.

> Check to see if the linked tables are opening the database
> in Exclusive mode.  Check this by opening a table in the
[quoted text clipped - 41 lines]
>>
>> Arnaud
david epsom dot com dot au - 17 Oct 2005 08:57 GMT
???? no idea.

Ok, try using a DAO script instead of an ADO script:

set dbe = createobject("dao.dbengine.3.6")
dbe.SystemDB = "NetworkDrive:\MySecurity.mdw"
dbe.DefaultPassword = "xxx"
dbe.DefaultUser = "xxx"
set db = dbe.opendatabase("NetworkDrive:\MyBackend.mdb"
ssql = "INSERT INTO <some_OTHER_linked_table> VALUES ...
db.execute ssql, 128 'dao.dbFailOnError

(david)

> David,
> Thanks for helping.
[quoted text clipped - 46 lines]
>>>
>>> Arnaud
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.