Dim SQL As String
Dim Conn as Adodb.connection
Dim rs as Adodb.recordset
Dim strConnect As String
SQL = "select * from TABLE_NAME where item_code = 'helmet'"
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\test.MDB;Persist Security Info=False"
Set conn = New ADODB.Connection
conn.CursorLocation = adUseClient
conn.CommandTimeout = 0
conn.Open (strConnect)
Set rsQ = New ADODB.Recordset
rsQ.CursorLocation = adUseClient
rsQ.CursorType = adOpenStatic
rsQ.Source = SQL
rsQ.ActiveConnection = conn
rsQ.Open
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).