测试的交流空间!

QTP连接MySQL数据库

上一篇 / 下一篇  2010-01-14 14:44:23

Set Conn = CreateObject("ADODB.Connection" )
str="DRIVER={MySQL ODBC 3.51 Driver};SERVER=192.168.3.*;DATABASE=db_yomovo2009;user id=*; password=*;Option=3"
Conn.open str
Set Rs = CreateObject ("ADODB.Recordset" )
sql = "select attribute from yo_accounts limit 0,6"
Rs.open sql,Conn,1,3
Do While not Rs.eof
attribute=Rs("attribute")
MsgBox attribute
Rs.MoveNext
Loop

Rs.close
Set Rs = Nothing
Conn.close
Set Conn = Nothing


TAG:

 

评分:0

我来说两句

Open Toolbar