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")
MsgBox TypeName(rs)
While Not rs.EOF
Set rsfeilds = rs.Fields
For Each field In rsfeilds
MsgBox field.Name & " : " & field.Value
Next
rs.MoveNext
Wend
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")
MsgBox TypeName(rs)
While Not rs.EOF
Set rsfeilds = rs.Fields
For Each field In rsfeilds
MsgBox field.Name & " : " & field.Value
Next
rs.MoveNext
Wend
No comments:
Post a Comment