' creating a datadabse object
Set dobj = createobject("adodb.connection")
'opening aconnecting
dobj.open("dsn=mydsn;username=;password=")
'executing a query and getting a record set
set rs = dobj.execute("select * from Table1")
' printing the values of the record set
do while (not rs.EOF)
columns = rs.Fields.Count
For i=0 To columns-1 Step 1
MsgBox rs.Fields.Item(i).Value
Next
rs.movenext
loop
' closing the data base
dobj.Close