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
..... |