How can you connect the database with QTP?

Answer Posted / siva

set mycon = CreateObject("ADODB.Connection")
mycon.open("driver=SQL Server;Server=localhost;database=(database name);trusted_connection=yes")
set myresult=mycon.execute(Select * from emp)
while myresult.EOF<>TRUE
msgbox.myresult.fields(0)
myresult.movenext
wend

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

1581


How you are developing the script? Using record and play back or manual?

629


Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance

1498


what is the difference between IE & Netscape in web testing on a log in page

1788


How to run a test using quicktest professional (qtp)?

538






Will down time for server and content maintenance/upgrades be allowed? how much?

613


Explain advantages and disadvantages kdf?

516


What is the recovery scenario in qtp?

566


How should I click on the right click menu objects When I trying to add the object properties to the OR.It is showing only Window(Window).Not all the objects of the window. Also while recording I found No script. How to solve this>.

1539


if anyone has idea of the interview procedure in covansys, plz send me a mail?

1524


What is the file extension of the code file in qtp?

559


Can any body please tell me the steps of keyword driven framework of QTP.

1565


How to recognise the webelement and verifying that webelement is enabled?

1641


How will you test a keyboard?

597


Hi am New to Automation Testing , any one can you help me what are the basic questiion are asked an interview?

1421