How to connect to data base?
Answers were Sorted based on User's Feedback
Answer / jayadev acharam
Using ADODB Object
Example
DB_Connect=CreateObject(ADODB.Connection)
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / akshay
Public Function database(Str,SQLstr,outResult1,outResult2)
'//Variable Declarations
Dim objConn, rsOut
'//Create a connection object.
Set objConn = CreateObject("ADODB.Connection")
'//Create a ResultSet Object to store the results.
Set rsOut = CreateObject("ADODB.Recordset")
'//Open the Created Connection object
objConn.Open Str
'//Pass the SQL query string and retrieve the Results
through the connection object
rsOut.Open SQLstr,objConn
If rsOut.EOF <> True AND rsOut.BOF <> True Then
'//Store the different column values
retrieved from a record in different variables.
outResult1=rsOut("col1")
outResult2=rsOut("col2")
rsOut.movenext
End If
End Function
| Is This Answer Correct ? | 4 Yes | 0 No |
what is the syntax for regular expression in QTP? how to create user defined functions in QTP?
What are the major/ important methods, functions in QTP we use realtime testing
Give me an example where you have used a COM interface in your QTP project?
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
How software tester can use constants and variables in scripts?
Hi. GetRoProperty and OUTPUT Value Both are same purpose or not? plz explain in deatil with example?
After i ran the Test in Batch mode i didn't get any results. Can any one let me know how it can be done?
Why do we use breakpoints in QTP?
Is it possible to run qtp scripts in Test Director(Scripts are uploaded in Test director)???and also how to see the test results in test director???
How can I change object description or check point values in qtp?
what are the difference between qtp8.2 to 9.0 surya
What is our exact stage involvement with QTP?