How do u connect database through QTP
tell me both Ms Access and SQL
Answer Posted / prasanth
we can connect to database in QTP using "ADODB" connection
object.
Sample code for SQL Server:
set mycon = createobject("ADODB.Connection")
mycon.open("driver=SQLserver;server=localhost;database=
(database name);trusted_connection=yes")
set myresult=mycon.execute("select * from sample")
while myresult.EOF <> TRUE
msgbox.myresult.fields(0)
myresult.movenext
Wend
you can get the connection strings
for "connectionstrings.com"
Kumar.rnv@gmail.com
Broadridge
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
What is the default add-ins in qtp?
Does QTP10 supports Windows 7OS +IE 9 combination? Which is the preffered combination ,Plz let me know?
How to use checkpoints in qtp ?
What do you mean by iteration?
How many add-ins comes by default with quicktest professional?
How to handle dynamic objects in quicktest professional (qtp)?
Explain the features and benefits of quick test pro(qtp)?
can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?
What are the advantages of Object Repository?
What is the quicktest professional testing process?
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
What are parameterizing tests?
Difference between test object and run time object?
How does you pass optional arguments in qtp?
How many types of object repository in qtp?