write a VBscript code to parametrize test script using test
data from sqlserver database?

Answer Posted / kamesh n

first connect to database using the following script


set sqlconnection=createobject("ADODB.connection")
set sqlrecordset=createobject("ADODB.recordset")

To open the connection

sqlconnection.open "You have to mention your database
connection string"

sqlrecordset.open "Give your query",sqlconnection

to run through all the records

if not sqlrecordset.EOF then


suppose your are going to set it to a textbox then

Browser(browsername).page(pagetitle).webedit
(testboxname).set sqlrecordset(columnname)


end if

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to test fly out menu in qtp?

597


Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this

2161


How does qtp identify the object in the application?

629


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

959


Tell me about qtp?

614






hi nani my doubt is how does qtp process metrix related to software process.

1649


To which environments does quicktest professional supports?

630


Can any suggest me what is exposure testing?

1464


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

1442


How to use output values in qtp ?

642


What is different command used in command Prompt while using QTP?

1852


How to handle Java tree in QTP?

857


How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks

1656


What is recovery scenario in qtp?

673


How to customize checkpoints with parameters?

3109