How do I retrieve data from SQLITE to VB6?

I use 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)

See here for connection string attributes:
http://www.connectionstrings.com/sqlite

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

Edit: try to delete: LongNames = 0; Timeout = 1000; NoTXN = 0; SyncPragma = NORMAL; StepAPI = 0 and add version: version = 3 If it works, try adding one attribute at a time until it no longer works To identify the damaged attribute.

I use the SQLite3 ODBC driver as my connection string,

< pre>Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
Dim rs As New ADODB.Recordset

Set conn = New ADODB.Conn ection
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)

< /p>

See here for connection string attributes:
http://www.connectionstrings.com/sqlite

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

Edit: try to delete: LongNames = 0; Timeout = 1000; NoTXN = 0; SyncPragma = NORMAL; StepAPI = 0 and add version: version = 3 If it works, try adding one attribute at a time, Until it no longer works, to identify the damaged attribute.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 945 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.