How do u connect database through QTP
tell me both Ms Access and SQL

Answers were Sorted based on User's Feedback



How do u connect database through QTP tell me both Ms Access and SQL..

Answer / prasanth

we can connect to database in QTP using "ADODB" connection
object.

Sample code for SQL Server:

set mycon = createobject("ADODB.Connection")

mycon.open("driver=SQLserver;server=localhost;database=
(database name);trusted_connection=yes")

set myresult=mycon.execute("select * from sample")

while myresult.EOF <> TRUE
msgbox.myresult.fields(0)
myresult.movenext
Wend


you can get the connection strings
for "connectionstrings.com"


Kumar.rnv@gmail.com
Broadridge

Is This Answer Correct ?    8 Yes 1 No

How do u connect database through QTP tell me both Ms Access and SQL..

Answer / alok

Through Data Driver Wizard

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More QTP Interview Questions

whare exactly we have to use functions and sub routain

0 Answers  


how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

3 Answers  


I have some real time based question.. 1.what are the challenges you have faced in your current project. 2.what are the bugs you found in your current project. 3.what are the strategies you follow to convert manual test cases into automation test cases. 4.how QTP identify two different browsers. 5. When you create a function library and share object repository what are the problems you have faced 6. How to solve the tool tip problem 7.what are the interesting bug you have found in your current project. 8.what is your daily work as a automation test engg. 9. how to create a weekly status report. 10. how many test cases you write,review and execute per day. 11.what are the uses of SQL in automation. 12.How to retrieve the data in html through vb script. 13.If application is very slow how to test the application in qtp.

0 Answers   Cap Gemini, TCS,


Is it possible to change the name of a test object. I mean when we are recording the script for an object (for Ex: Username is a text field which has value "Babu",i am recording that). Then the Name of the object will become "Babu" in object repository. If i want to change "babu" as "xxxxx" .. is it possible to do? Pls help me in this .. if you didn't understand the question, pls let me know.

4 Answers  


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1 Answers  


How to create frame work for qtp?

1 Answers   Bank Of America, Polaris,


Analyzing the checpoint results?

0 Answers  


I want to run my qtp scipt on the system where qtp is not installed .I don't want to install qtp but i want that system should use the qtp from another system in lan just the qtp instance should be launched on that system without having qtp installed on it .I probably know the solution that it will be solved through RMI but how to get this problem solved plz help i anyone know the answer

4 Answers   Cimcon,


How to call a function in QTP?Is there any method ? Thanks , PRASANNA

2 Answers  


Write a script to verify font style and color of a windows object using descriptive programming

0 Answers  


How does Parameterization and Data-Driving relate to each other in QTP?

2 Answers  


Once the Actions are splitted , is there any way to merge them

3 Answers  


Categories