R
ramon soler
here is the code it opens dab and then give the error 7866 when opoencurrent
dbContab.Close
Set dbContab = OpenDatabase(dirbase & archbase, False, False, ";pwd=" &
clavebd)
On Error GoTo 0
'error 7866 exclusive mode which is not true when opendatabase why
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase dirbase & archbase, , clavebd
For Each tdf In dbContab.TableDefs
If Not (tdf.Attributes And dbSystemObject) <> 0 Then
If tdf.Name = "prefinancieros" Then
On Error GoTo 0
SqlVerSQL = dirbase & "logtrans." & archbase
On Error Resume Next
appAccess.DoCmd.TransferDatabase acExport, "Microsoft Access", SqlVerSQL,
acTable, tdf.Name, tdf.Name, False ' true solo definiciones"
End If
End If
dbContab.Close
Set dbContab = OpenDatabase(dirbase & archbase, False, False, ";pwd=" &
clavebd)
On Error GoTo 0
'error 7866 exclusive mode which is not true when opendatabase why
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase dirbase & archbase, , clavebd
For Each tdf In dbContab.TableDefs
If Not (tdf.Attributes And dbSystemObject) <> 0 Then
If tdf.Name = "prefinancieros" Then
On Error GoTo 0
SqlVerSQL = dirbase & "logtrans." & archbase
On Error Resume Next
appAccess.DoCmd.TransferDatabase acExport, "Microsoft Access", SqlVerSQL,
acTable, tdf.Name, tdf.Name, False ' true solo definiciones"
End If
End If