标题: qtp 数据库查询用for循环法查询到的数据不全 [打印本页] 作者: mallybel 时间: 2012-7-12 10:14 标题: qtp 数据库查询用for循环法查询到的数据不全 connectionstr="DRIVER={Oracle in OraHome92};SERVER=TEST;UID=testWD=REF;DBQ=TEST;DBA=W;APA=T;EXC=F;XSM=Default;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=Lo;BAM=IfAllSuccessful;MTS=F;MDI=Me;CSR=F;FWC=FFC=10;TLO=O;"
Set adoconn=createobject("adodb.connection")
adoconn.Open connectionstr
sqlstr="select * from table t where t.password='******'"
set result=adoconn.Execute(sqlstr)
For i=1 to result.Fields.Count
print result.fields.item("name").value
result.MoveNext
Next
'While not result.EOF
' print result.fields.item("name").value
' result.MoveNext
'Wend
adoconn.Close
Set adoconn=nothing