Advertisement
Guest User

test connection to SQLite - db file: NWind.db

a guest
Jul 24th, 2012
421
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub testODBC()
  2.  Dim a As New ADODB.Connection
  3.  dbfile = ThisWorkbook.Path & "\NWind.db"
  4.  With cn
  5.     .ConnectionString = "DRIVER=SQLite3 ODBC Driver;" _
  6.         & "Database=" & dbfile & ";" _
  7.         & "LongNames=0;" _
  8.         & "Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;" _
  9.         & "Extended Properties=Excel 8.0;"
  10.     .Open
  11. End With
  12. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement