Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is Port testing. Whhen will you perform?

1895


what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana

1888


i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer

3972


A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

1684


What is accessibility check point?

1040


please any one can explain the keyword driven framework. with gmail example.

2053


Why do we use breakpoints in QTP?

1010


Can any suggest me what is exposure testing?

1771


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

1060


I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.

2086


How can i check items sorted or not in a weblist ? Give me the script for this...

1988


.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

2129


what QTP Options do you know?

3348


Differentiate the type of test cases which can be automated and which cannot be automated?

979


I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.

2011