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


Please Help Members By Posting Answers For Below Questions

What are the major/ important methods, functions in QTP we use realtime testing

2265


How many types of recording facility are available in quicktest professional (qtp)?

609


Explain the differences between table and db checkpoints?

583


How u will do versioning in QTP?

1462


How to use descriptive programming?

614






hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1462


Explain advantages and disadvantages kdf?

525


Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ

1533


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

617


i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?

1555


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1621


How to use transactions in qtp?

563


What is regular expression?

579


Explain advantages and disadvantages of ddf?

596


What are the different ways to invoke an application using QTP?

647