How to connect to the Database from QTP?
Answer Posted / sandipgami84
Dim ObjCon, ObjResult, ObjSQL
set ObjCon=Createobject("ADODB.Connection")
ObjCon.ConnectionString("DSN= ,UID= ,PWD= ")
ObjSQL="SELECT * FROM Emp"
ObjCon.Open()
ObjResult=ObjCon.Execute(ObjSQL)
ObjCon.Close()
ObjResult=Nothing
whtever ur data stored in ObjResult variable
| Is This Answer Correct ? | 31 Yes | 13 No |
Post New Answer View All Answers
What is a quick test professional?
Hi iam shankar here, right now iam working on manual testing. i want to switch over automation tool qtp, right now iam taking training class outside on qtp, please let me know the cost of QTP tool for full version, wether it's an annual subscription or monthly subscription.
How is test case write?
How to find array size in qtp?
What is recovery scenario in qtp?
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
How can i click on any Excel sheet's "H" column with out writing coordinates Ex:Window("Book1").WinObject("Book1").Click 498,14 I dont want to give coordinates like 498,14 Can i open "H" column by writing like Ex:Window("Book1").WinObject("Book1").Click "H" or Ex:Window("Book1").WinObject("Book1").Click "H","1" or Ex:Window("Book1").WinObject("Book1").Click H,1 If i want to click on "Sheet3" of an excel sheet, Can i open like Ex:Window("Book1").WinObject("Book1").Click "Sheet3" Please help me any one
What is the purpose of loading qtp add-ins?
How to capture dynamic values in load runner and how Each of the captured values are to be written to a text file (c:\temp\LoadRunner1.txt)
Difference between test object and run time object?
What are the features and benefits of quick test pro (qtp 8.0)?
How to call a test from another test?
The hybrid framework can be implemented for any application. Is it true?
Explain the views in the QTP GUI?
How to creating an output value using quicktest professional (qtp)?