????????QTP?????MySql ?????????????MySql??????? ??е?????????????????
???????????????Mysql 5.1??????? ??????????????????TXT????????????????udl??????????????????????????????????????????????Mysql??????????? ????????windows???????????????????Mysql 5.1???????????????????????tò???????Mysql??????????????? Miceosoft OLE DB Provider for ODBC Drivers ????????
????????????????? ???????????á???????????????????????????????д?????????????????????MySql?????????????????????ú??????????????????????????????????????????

???????????ú???????????ü??±???????*.udl??????????Щ???? ????????????????????????????????

????????????????????д?????
??????????
1?????????? USER_ ????? SCREEN ?? SEREENNAME ???????o???"test_"????????????
2?????д???????????棬?????????
3??????????????????????????????????? Welcome test01?? ???????????????????????????????????????????????
Dim conn
Dim name
Dim sql
Dim suu
Dim inn '??????
SystemUtil.Run "http://192.168.0.233/web/guest/home"
'???????????????±???????????? ???????и??????? ??????????????????????? ??????????????????Password=1111
Mysql="Provider=MSDASQL.1;Persist Security Info=False;User ID=root;Password=1111;Data Source=sqltest"
'select screenName??screenName from user_ where screenName like 'test__';
'??λ????? ??????????? USER_ ???? screenName??screenName ??2???????????а??? test ??????
sql="select screenName??greeting from user_ where screenName like 'test__';"
Set conn=CreateObject("ADODB.CONNECTION")
conn.Open Mysql
If conn.State<>0 Then
Reporter.ReportEvent micPass??"??????"??"??????"
else
Reporter.ReportEvent mimicFail??"???????"??"???????"
End If
Set res=CreateObject("ADODB.Recordset")
res.Open sql??conn??1??1 '1??1??????;1??3???????????;2??3??????????
res.MoveFirst'??α???????????
sum=""
'res.EOF????α???????
While Not res.EOF
'????????????????????
'    For i=0 to res.Fields.Count-1'str.Fields.Count?????θ???
'     sum=sum& res(i) & " " '????????????????
'   Next