How do u connect database through QTP
tell me both Ms Access and SQL
Answer Posted / 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 |
Post New Answer View All Answers
Define Environment Variable in UFT and its uses?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
hi guys, pls tell me for testing institution training hub, hitech city is best or not?
What are the differences between qtp and winrunner?
what is the advantages and disadvantages of using functions instead of re usable actions
I hav installed QTP8.2, im working on webapplication, while running the script giving error msg like "QTPro.exe generated errors and will be closed by windows. You will restart the program. An error log is being created". Pls anybody what is the problem, what i have to do for this? Thanks...
Explain QTP using different development techniques ?
What is the extension of qtp local repository?
Do you know how to connect database? Can you tell me the procedures?
I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!
Name the different types of recording modes?
Which features or drawbacks of QTP lead to the upgrade for a newer version?
What is keyword driven framework?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
Hi All, I have QTP installed on my machine but the application under test is on remote machine. I need to automate the scenarios which consist of automatically enter the remote machine through IP address ,record the application in remote machine and run it also when played. Can some one tell how to record the application in remote machine.