Friday, March 1, 2013

QTP : Program to Display 1st Column Data in Database through QTP

 Program to Display 1st Column Data in Database through QTP



Set oConnection=createobject("adodb.connection")
Set oRecordSet=createobject("adodb.recordset")

oConnection.Open "Connection String for the Server"
oRecordSet.Open "Query" ,oConnection

Do while not oRecordSet.EOF
        sData=sData &vblf & oRecordSet.Fields.Item(1)
        oRecordSet.MoveNext
Loop

msgbox oRecordSet
oConnection.Close
Set oConnection=Nothing
Set oRecordSet=Nothing

No comments:

Post a Comment