|
4#
楼主 |
发表于 2010-2-11 17:07:38
|
只看该作者
在QTPl里写了这个,语法报错~~
'建立数据库连接
Dim Cnn,Rst,strCnn,sqlRordset,RequirementNO
Set RequirementNO="2010020019"
strCnn= "DRIVER=SQL Server;SERVER=10.28.10.46;UID=saWD=123@abc;APP=QuickTest
P
rofessional;WSID=ISS110301000144;DATABASE=PSARRD_Test“
Set Cnn= CreateObject("ADODB.Connection")
Cnn.OpenstrCnn
Set Rst= CreateObject("ADODB.Recordset")
'记录集
sqlRordset=select
Substring(ai_nextowner,Patindex('%(%',ai_nextowner)+1,Patindex('%)%',ai_nextowner)-Patindex('%(%',ai_nextowner)-1) as nextLoginName
,ai_approveType,wf_currentStep,ai_requirementNo
from RRD_ApplyInfo as RRD_AI
left join WF_WorkFlow as WF_WF on RRD_AI.ai_applyid=WF_WF.wf_FormID
where 1=1
and ai_flag=0
and wfc_id=17
and AI_RequirementNO ='2010020019'
Rst.Open sqlRordset,Cnn
Rst.MoveFirst
Do While Not Rst.EOF
MsgBoxTrim(Rst.Fields("TestResult"))
Rst.MoveNext
Loop
Rst.Close
Cnn.Close
Set Rst= Nothing
Set Cnn= Nothing |
|