Guest User

How do I access SQLite from VBA

a guest
Nov 21st, 2011
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Dim conn As New ADODB.Connection
  2. Dim dbName As String
  3.  
  4. 'Define the connection string
  5.  
  6. dbName = "Driver = {SQLite3 ODBC Driver}; Database = D: yourdbname.db"
  7.  
  8. 'Open the database
  9.  
  10. ff.Open dbName
  11.  
  12. ff.Execute "create table a (a, b, c);"
  13.  
  14. 'Other operations on and VBA to connect to other DB like Access the same.
  15.  
  16.  
  17. 'Close connection
  18. ff.Close
Advertisement
Add Comment
Please, Sign In to add comment