How to connect to the Database from QTP?

Answer Posted / murali raju

Microsoft ADO (ActiveX Data Objects) is a Component object
model object for accessing data sources.The ADO Recordset
object is used to hold a set of records from a database
table. A Recordset object consist of records and columns
(fields).
In ADO, this object is the most important and the one used
most often to manipulate data from a database.

Srvname is a connection string.if u already installed
oracle in your system..using that path u can connect oracle
database...if u dont have oracle give the conncetion string
path..whatever connection string created used in database
checkpoint by
default...Example:DSN=QT_Flight32;DBQ=C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\flight32.mdb;Driver=C:\WINDO
WS\system32\odbcjt32.dll;DriverId=281;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;

Is This Answer Correct ?    39 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to check feasibility of the appliction?in automation testing?

1465


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

552


What are the advantages of Object Repository?

575


What is the difference between the keyword view and expert view?

521


In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.

1521






Explain the views in the QTP GUI?

612


What is checkpoints for qtp?

522


i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.

1525


ACTUALLY I AM WORKING IN THE DISTRIBUTION DOMAIN.MY COMPANY IS PROVIDING DISTRIBUTION SOFTWARE FOR PHARMA AND FMCG DISTRIBUTORS.HERE I AM USING QTP 9.2.HERE IN MY APPLICATION WHILE RECORDING ONE WINDOW APPEARS.IN THAT I CAN SELECT THE ITEM OR NO NEED TO SELECT.BUT WHILE RUNNING THE SAME SCRIPT THE WINDOW MAY NOT APPEAR OR APPEAR.HOW TO WRITE SCRIPT FOR THIS

1514


When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.

1597


Explain the concept of how quicktest professional identifies object?

527


Where we can use the analog mode and where we can use the low – level mode?

562


How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538

3604


Explain the concept of object repository and how QTP recognizes objects?

544


Step 3&4 are repeated until an the object in recognised uniquely.

1514