How to handle exception when data table is not available in
local host system or path is not correct(explain statement
with example)



How to handle exception when data table is not available in local host system or path is not corre..

Answer / 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

More QTP Interview Questions

in a web table , i want you to click a particular object inside cell

2 Answers  


What are the different kinds of test steps?

0 Answers  


how to identify the user defind varibles? plz tell me

1 Answers  


After running scripts how you report results ,there is any specific report form

5 Answers   Novartis,


How to create a standard checkpoint ?

0 Answers  






Explain actions in qtp ?

0 Answers  


hello, i just started searching for a job on QA ,need QTP software full version.plz can any body help me...my email id is padma_ub@yahoo.com.thanks in advance.

0 Answers  


what is test scheduling?

1 Answers  


pls help me with scripting,right from the beginning in QTP

1 Answers  


Key word driven framework

0 Answers   Wipro,


how can i change the action path that called in other action. when i copy one action to other pc,the action"test2" calls another action(C:\test1\action0),and i update this"test1",the folder update to "action1",but when i open "test2", it just point the call path to "C:\test1 \action0", but does not update to "action1",and the change i make can be shown in test2. so, can i update the call path manully? thanks

2 Answers   HP,


How to handle the exceptions using the recovery scenario manager in qtp?

0 Answers  


Categories