dbTalk Databases Forums  

The Microsoft Office Access database engine cannot open or write tothe file

comp.databases.ms-access comp.databases.ms-access


Discuss The Microsoft Office Access database engine cannot open or write tothe file in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Roger
 
Posts: n/a

Default The Microsoft Office Access database engine cannot open or write tothe file - 03-23-2011 , 07:02 AM






access 2007 runtime, FE / BE on different servers, both running
windows server 2003

periodically the following relink function fails during
createTableDef / append / refresh, with this error being logged
The Microsoft Office Access database engine cannot open or write to
the file 'c:\foo\bar.mdb'.
It is already opened exclusively by another user, or you need
permission to view and write its data.

the BE MDB exists and has the required permissions
now strTables() has five tables - I checked, they all exist in the BE
MDB
and in this instance, the error occurred linking the second table

so if it can 'open / write' to link the first table, why not the
second table ? timing issue ? network problem ?


For intT = 1 To intMax
On Error Resume Next
strSql = ";DATABASE=" & strTo
Set tbl = db.TableDefs(strTables(intT) & "_" & lngEmpCode)
If (Err) Then
5
On Error GoTo fErr
Set tbl = db.CreateTableDef(strTables(intT) & "_" &
lngEmpCode, _
dbAttachSavePWD, _
strTables(intT), _
strSql)
db.TableDefs.Append tbl
db.TableDefs.Refresh
Else
On Error GoTo fErr
6
tbl.Connect = strSql
tbl.RefreshLink
End If
Next intT
7
.....

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.