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 |
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
How to start recording using quicktest professional (qtp)?
what is the purpose of .vbs file?
What the differences are and best practical application of each.
What is the difference between CVS and VSS? Are you store QTP SCRIPT In VSS OR CVS? Where you store QTP Script?
1 Answers Brain Roots, Ordain Solutions,
What is output value? How many types of output values are there in qtp?
What are the methods of the TextStream object that are used for reading from a text file?
how you update scripts in qtp?
A web Page has a webtable with four columns and four rows. The first column is of ID and has values of 100,100A,A100,100y Find out the number of rows whose ID starts with 100. Similarly the last column is 'number of links'. Each row in the last column has values like link1,link2,link3 etc Find out the number of links where id is 100
how to open Excel sheet & write in it & save it?
Can a function return a dictionary object?
what is meant by descriptive programming?