How to use SQLite database from MS Access?
Asked Answered
N

4

10

I would like to use an SQLite database from Microsoft Access (access from- or transfer the contents to Microsoft Access).

  • How can this be done using VBA?

This is for a client who can not install extra software:

  • Does a library exist in VBA to use SQLite databases?
Noach answered 25/3, 2010 at 4:46 Comment(1)
The condition with no installation of other software means there is no way to do what you want, unless you can export from SQL Lite in a format that Access/Jet/ACE can import.Crigger
F
2

If you can use the sqlite3.exe command line tool, then have VBA spawn that and dump the data to a csv file. Then Access can read both local data and the CSV file and copy appropriately.

Flowerer answered 26/3, 2010 at 4:31 Comment(0)
B
8

This question popped up in my recent (2021) search on the same topic, and the answer has changed since 2010.

There are now several ODBC drivers for SQLite. Here are two (I have no affiliation with either):

Free: http://www.ch-werner.de/sqliteodbc/

Paid: https://www.devart.com/odbc/sqlite/download.html

Brittne answered 2/1, 2021 at 22:2 Comment(1)
Christian Werner's driver has been around for a long time (I wonder if he will ever give it version # 1.0 :) ), but these links should very much be on this Q&A.Eurhythmics
I
3

Does a standard library exist in VBA to used sqlite database?

No. Access and VBA do not have any native capability to connect to SQLite data sources.

You would have to install additional software to allow Access to use SQLite.

Isochronize answered 25/3, 2010 at 15:11 Comment(2)
updated link (now with an extra 2 after www): www2.sqlite.org/cvstrac/wiki?p=SqliteWrappersPraetor
@Praetor I made the change. Thanks.Isochronize
F
2

If you can use the sqlite3.exe command line tool, then have VBA spawn that and dump the data to a csv file. Then Access can read both local data and the CSV file and copy appropriately.

Flowerer answered 26/3, 2010 at 4:31 Comment(0)
W
1

There are a number of solutions available which a simple Google search would reveal. Here is one: http://www.freevbcode.com/ShowCode.asp?ID=6893

Whore answered 25/3, 2010 at 5:28 Comment(1)
Thank you, But this "Application" is for a client and I can not make him install "extra software" than the one already installed (in this case MS-Access)Noach

© 2022 - 2024 — McMap. All rights reserved.