Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do i retrieve data from SQLite to VB6?

i am using SQLite3 ODBC Driver as my connection string,

Dim conn As ADODB.Connection
 Set conn = New ADODB.Connection
Dim rs As New ADODB.Recordset

Set conn = New ADODB.Connection
conn.ConnectionString = "DRIVER=SQLite3 ODBC Driver;Database=test.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;"

conn.Open

rs.Open "select * from Artists", conn, adOpenDynamic, adLockOptimistic
MsgBox rs.Fields(0)
like image 342
illumi Avatar asked Sep 15 '10 07:09

illumi


1 Answers

Refer here for the connection string properties: http://www.connectionstrings.com/sqlite

You should also specify the version (3 or 2).

Edit: try to remove: LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0 And add the version: version=3 If it works, try to add a property at a time until it won't work anymore, to identify the broken property.

like image 129
vulkanino Avatar answered Sep 22 '22 17:09

vulkanino