Jobs
Author: Glenilo Geraldizo Date Submitted: 2/2/2005 Category: Database Compatibility: VB 6 This code has been accessed 9279 times.
Email Yourself this snippet:
dim cn as new adodb.connection dim rs as new adodb.recordset
Code
'let the database name be sample.mdb 'assume that the table name is table1 'assume that the database is located in the folder 'where the application is located 'paste this code on the Form_Load event cn.open "provider = Microsoft.Jet.OLEDB.4.0; Data Source =" & app.path & "\sample.mdb" with rs .activeconnection = cn .cursortype = adopendynamic .locktype = adlockoptimistic .source = "select * from table1" 'this is to select all records from the table .open end with