VB Compatible SQLite

Original Post - December 2, 2006

Updates:
Version 3.3.12 - January 27, 2007
Version 3.3.13 - March 12, 2007
Version 3.4.2  - August 28, 2007

You can download the compiled SQLite3VB binary below.

Visual Basic Declarations


'// SQL Lite dll declarations:
Private Declare Sub sqlite3_open Lib "SQLite3VB.dll" (ByVal FileName As String, ByRef handle As Long)
Private Declare Sub sqlite3_close Lib "SQLite3VB.dll" (ByVal DB_Handle As Long)
Private Declare Function sqlite3_last_insert_rowid Lib "SQLite3VB.dll" (ByVal DB_Handle As Long) As Long
Private Declare Function sqlite3_changes Lib "SQLite3VB.dll" (ByVal DB_Handle As Long) As Long
Private Declare Function sqlite_get_table Lib "SQLite3VB.dll" (ByVal DB_Handle As Long, ByVal SQLString As String, ByRef ErrStr As String) As Variant()
' sqlite_get_table Returns a 2 dimensional array including column headers

Private Declare Function sqlite_libversion Lib "SQLite3VB.dll" () As String ' Now returns a BSTR
Private Declare Function number_of_rows_from_last_call Lib "SQLite3VB.dll" () As Long
' number_of_rows_from_last_call returns the number of rows from the last sql statement. Use this to ensure you have a valid array

Visual Basic 6 Example
 
I've written up a quick program that will display the results from a SELECT query to any database in a ListView. The source code can be downloaded below.

SQLite3VB Test VB Project
This test application requires the SQLite3VB.dll (that can be created using this tutorial or found below) to be located in your computer's system folders (Ex C:\Windows)

Download SQLite3VB.dll

Version 3.3.12
SQLite3VB.dll (Zip File)

Version 3.3.13
SQLite3VB.dll (Zip File)

Version 3.4.2 (Most Current Build!)
SQLite3VB.dll (Zip File)

If I have saved you time and/or money and you're feeling grateful feel free to use the below link to make a donation via PayPal. Any dollar amount is greatly appreciated.

Please select an amount:
$10
$15
$20
$30
Other 

Hit Counter