Search here for all the info you want in this Blog

Adodb Object

dim adodb
Set adodb = WScript.CreateObject("adodb.connection")

' create the DSN in administrative tools and give the name 
' in below connection string
adodb.Open("dsn=xdsn;username=root;passsword=")

Set rs = adodb.Execute("select * from emp")

MsgBoxTypeName(rs)

WhileNot rs.EOF

        Set rsfeilds = rs.Fields
        ForEach field In rsfeilds
                MsgBox field.Name & "   :   " & field.Value
        Next
        rs.MoveNext
Wend

No comments:

Post a Comment