Example using Microsoft OLE DB Provider for ODBC (MSDASQL)



dim conn, rs, SQL, connStr
set conn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.RecordSet")
conn.ConnectionString = "DSN=access;UID=;PWD="
conn.Open()
rs.Open "SELECT * FROM table", conn, 3, 3
Do While Not rs.EOF 
 wscript.echo rs.Fields(0).Value  
 rs.MoveNext 
Loop 

Example using OpenLink OLE DB Provider for ODBC (OpenLinkODBC)



dim conn, rs, SQL, connStr
set conn = CreateObject("ADODB.Connection")
set rs = CreateObject("ADODB.RecordSet")
conn.ConnectionString = "Provider=OpenLinkODBC;DSN=access;UID=;PWD="
conn.Open()
rs.Open "SELECT * FROM table", conn, 3, 3
Do While Not rs.EOF 
 wscript.echo rs.Fields(0).Value  
 rs.MoveNext 
Loop