VB6: How To Show SQLite in DataGrid

Private Sub Form_Load() Dim sqlstr As 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=" & App.Path & "/database.db;" conn.Open rs.Open "SELECT * FROM tblGiat", conn, adOpenKeyset MsgBox "Total Number of records = " & rs.RecordCount End Sub 

I have successfully connected the database to VB6. Now I need help, how to display that database into DataGrid.

2

Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like