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

What is exact difference between “while” and “do while” in QTP ?

1 Answers  


What is meant by Output Value in UFT?

0 Answers  


Hello, I am working on automating unix application using QTP via terminal emulator.Recording and playback works as i execute my test case. I need to parameterise my data now. Steps to be followed 1. go to the application TeWindow("TeWindow").Window("Connect").WinButton ("Connect").Click 2. Make a transaction to an account I am able to make transaction one at a time (one person when i run the script) and the script is as below and works fine. TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "./4ee.sh" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "a21100002" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "tcccc" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "test" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type "6" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micF1 TeWindow("TeWindow").TeTextScreen ("TeTextScreen").Type "xexit" TeWindow("TeWindow").TeTextScreen("TeTextScreen").Type micReturn TeWindow("TeWindow").TeTextScreen("TeTextScreen").Sync 3. Now i need to Make a transaction to the account for the list of people available from data table. How do i do this? Please let me know if you can Thanks, Chaya

1 Answers   Apex,


What is difference between WR and QTP?

2 Answers  


How do we retrieve the content from a text box in a web page

2 Answers  






Explain different recording modes?

0 Answers  


Can I record on netscape browser does it require any special settings ?

2 Answers  


how to prepared for first for the first interview?

0 Answers   Collabera,


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

5 Answers   Novartis,


How you debug your script?

0 Answers  


I have 5 no.of Action in my Test. Out off which i should make 3rd action as my start-up action. How should i make it?

5 Answers  


Explain about Test Fusion Report of QTP?

0 Answers  


Categories