how we connect oracle or sql data server database to qtp.
Hi Ram I was your answer for this. Can you kindly let me
know in details steps on How we can connect to database. i
am using QTP9.2 and SQL Server Database. I am new for QTP
and this would be of great help.Thanks
Answers were Sorted based on User's Feedback
Answer / snig
http://funandknowledge.blogspot.com/2008/03/qt.html
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gms
'Declaration for SQL
Dim objConnection,objRecordset,count1
'Connecting to the database
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open "Driver={SQL Server};" & "Server=YOUR
SQL SERVER NAME;" & "Database= DB NAME;" & "UID=USERID;"
& "PWD=DB PASSWORD;"
'Running the query
sql1 = "GIVE UR QUERY HERE"
'Create record set for the query
Set objRecordset = CreateObject("ADODB.Recordset")
objRecordset.Open sql1, objConnection
As this is a Back-End process, you cannot view the result
set. so you can place the result in the datatable using the
following steps:
'Retrieving data from the database to the data table
count1 =1
While Not objRecordset.EOF
datatable.SetcurrentRow (count1)
Datatable("C",1)= objRecordset("nbr").value
objRecordset.movenext
count1 = count1+1
wend
Is This Answer Correct ? | 0 Yes | 3 No |
Hi, Hope you viewers are doing fine with good health. What are the steps and connection parameters to connect to Oracle db ? Can you connect with just the Oracle client or Oracle XE ? Cheers!!
What are the major/ important methods, functions in QTP we use realtime testing
I want to clear the webedit field without using set"" in qtp script
How to capture checkbox properties when properties of the object keep changing on relogin to the application.
Suppose i have a script which is having 100 lines.I want to execute that script starting from line no 75.means first qtp should read the script from line no 75 how can u do it.
5 Answers Lehman Brothers, rsystems,
What are SetToProperty, SetRoProperty, GetToProperty scripting?
What are the trigger events in qtp?
While testing .net applications with QTP 9.1 in normal recording mode, QTP records my unintentional mouse clicks and window dragging which I don't want. But I can't stop QTP recording those mouse clicks and window dragging. Can somebody let me know how I can get rid of it, please ! Thanks.
How to export QTP results to an ".xls" file?
if my application shows 100 records and in my database having 200 records how i can validate using QTP tool?plz exp. in detail?
What are the Test design techniques you uses in ur project?
1) How will you associate SOR in Runtime? ( u had written 10 lines of code from 11th line u want associate what code u will write) 2) How will close n number of browser expect only one which is has to test? ( First tell me how will you identify how many browser are opened ) what logic u will use? 3) In web Table u want to click on link ( Link Name Mohamed ) you dont know in which row and column that link is there. how wil u identify and click on that link.