How to connect to the Database from QTP?
Answer Posted / manjula b
Set odb=createobject("ADODB.connection")
Strpath="c:usershappydesktopdesktop31database2.mdb"
Odb.connection string="provider=microsoft.jet.oledb.4.0;datasource="&strpath
Odb.open
Sql1="select *from employees"
Set orec=odb.execute(sql1)
Dountil orec.eof=true
Print orec.fields("employee name")
Orec.move next
Loop
Odb.close
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Differences between text and test area checkpoints?
On the website, the protocol has been changed https: to https what you will do? Tell me your approach?
1.How to record ,capture and also script to capture the close buttons. 2.How to record ,capture and also script to capture the options ---File ->save and File ->close in a browser and PDF files. 3.How to compare the Excel sheet values in a report using QTP scripting. 4.How to compare 2 PDf reports using QTP scripts as well reording. 5.How to compare 2 Excel reports using QTP scripts as well reording. 6.How to save a PDF report to a folder and then translate the report to an Excel type of report and compare that Excel Report with an other excel report. Please clarify me
can the activities of test case design be automated?
How to give a call to another action from one action?
How do I lauch my test website using code from qtp in different environmet, uat and PPTE?
How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks
What are the different attributes used with regular expression?
what are the challenges you have faced while testing web based application using the automation tools ?
Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..
If created one virtual object? Next time I changed the window position will it work?
images are dynamically changes how to compare two images with out using the bitmap
What are the different ways to invoke an application using QTP?
What the differences are and best practical application of Object Repository?
Approach for Installation,comaptibility,system testing