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

what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?

1676


what is error and fault in terms of software quality?

1679


Explain different types of checkpoints?

782


How do you test the text displayed in the header portion of times of india epaper. Hot news(banner) are scrolling in the top of the page, how do you test using QTP?

1738


What is qtpro?

813


Where we can use the analog mode and where we can use the low – level mode?

788


how interviews will be on QTP?

1711


Hi ,Can any one pleas explain how to test splash objects using QTP?

2134


when will you do debug your script? and explain that process?

1663


How to use parameterization in qtp?

837


How will you test a stapler?

825


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

847


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1682


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

1678


What is Port testing. Whhen will you perform?

1706