How to handle exception when data table is not available in
local host system or path is not correct(explain statement
with example)
Answer Posted / shyam prasad
Dim Dsn_conn,rs
Set objConnection=Createobject("ADODB.Connection")
Dsn_conn= "DSN=QT_Flight32;DBQ=C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight32.mdb;Driver=C:\WINNT
\system32\odbcjt32.dll;DriverId=281;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;"
objConnection.Open(Dsn_conn)
Set rs=CreateObject("ADODB.RecordSet")
Set rs=objconnection.execute(" select flight_Number from
Flights where flight_Number>20330") (Instead of this
statement search the table u will get it
)
rs.MoveFirst
While Not rs.EOF
Msgbox rs.fields.item("flight_Number")
rs.movenext
Wend
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Is it possible to switch between recording modes during a test creation?
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.
How to export quicktest professional results to an .xls file?
Does quicktest professional is unicode compatible?
Do you know how to connect database? Can you tell me the procedures?
What are the different types of action?
Is it possible to split an action? How?
What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?
How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?
Explain how qtp identifies objects?
What are the key elements available in test result window?
What is difference between shared and local object repository?
How to creating an output value using quicktest professional (qtp)?
can u explain the keyword driven framework with an example clearly how to create all the files and how to attach to main test.
How to use actions in qtp ?