Using SQLITE with VB6

Manuel Ferreria picture Manuel Ferreria · Sep 21, 2008 · Viewed 29.3k times · Source

I am currently using an MSAccess mdb file for a redistributable app.

A while ago I found out about SQLite, as an alternative to my solution, but the binaries they provide do not offer the possiblilty of using them as an object in VB6. (Or at least I couldn't figure it out how).

Does anyone has a link, or could write a little about connecting to a SQLite DB from VB6, and its differences with using ADO?

Answer

AngryHacker picture AngryHacker · Mar 31, 2009

I've been working on a VB6 app with SQLite for a while and I've tried a couple of methods of connecting.

So let me summarize and give, what in my opinion is, the best answer.

Methods mentioned by Ben Hoffstein, gobansaor and David W. Fenton are good, but they rely on proprietary interfaces to sqlite.

OLEDB provider by CherryCity is good because it's using a standard interface, but they have a per installation royalty system, which makes it really, really expensive. And their website does not state upfront that the product has royalties. You only find out when you actually bought the product for development and want to distribute it.

Finally there is the absolutely free as in both beer and speech, SQLite ODBC driver at http://www.ch-werner.de/sqliteodbc/ . It works pretty well and I haven't encountered any major issues just yet. The only minor issue I've encountered is that it won't allow multiple statements in one call, so you just have to separate it. In addition, the driver allows the DSN-less approach, which makes everything so much easier.

So, imo, the ODBC driver is really the best solution.