Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Posts
    3

    Unanswered: error when opening with .opencurrentdatabase method

    here is the code it opens dab and then give the error 7866 when opoencurrent
    dbcontab opends perfect where is the error before it works fine
    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

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    And is there a question around here somewhere?????
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •