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 |
What is contained in the object repository?
Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?
In application have 2 list box oppsite list box two edit box is there.so now through using DP how can we select 3 opption in first list box and 2box semect 4 opption.in edit box also we have to write 25 ,28.how can we do this
Any one knows about descriptive programming to identify objects in a page? Kindly drop me mail prasanna.sabat@gmail.com
How to make arguments optional in a function?
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
what is vmodel?advantages and disadvantages of vmodel?
hi testers,one script has three actions , at the of running three actions are running , how to set run only perticular action and what is the use of split the action? when it will be useful?
Tell me about your project? please help me how to tell about insurance project
Hello Everybody, Please tell me the concept of recovery management in QTP by giving any practical example of it. Thanks, Gaytri
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..