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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / rajh

dim con,rec
set con=create object("adodb.connection")
set rec=create object("adodb.recordset")
con.open"provider=sqloledb.1;server=name;username=scott;pwd=tiger;database=dbname'
rec.open"sql statement"con
while not rec.eof
window("winmame").winedit("uname").set rs.fields(un)
in the same way use the data
loop

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More QTP Interview Questions

I Selected for TCS-Chennai(Contract to hire) position plz suggest me whether i have to join or not

2 Answers   TCS,


What is the use of low level recording? How does it useful?

1 Answers  


How can i learn Descriptive programming in QTP. Please reply.

3 Answers  


Hi Recently I Attend one interview .The intervier ask on Question in QC 9.2 . The Qus was while ruuning the Batch RUNS scripts in test lab if defect will comes .The defect automaticly wants to genate . How to Configure in QC . Thank You Balaji

0 Answers  


in howmany ways you perfrom batchtesting

6 Answers   Lehman Brothers,


If the object property is changing very frequently, what was your approach?

2 Answers  


Can we add the objects of an application dynamically?

2 Answers   KEN Group, LD College,


When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti

0 Answers   HCL,


As u told write Libarary files in QTP. Do u use ever oject repositary 0r spy while writing scripts and for which type of testing u prepared test scripts.

1 Answers  


What is keyword view and Expert view in QTP?

1 Answers   Crea,


Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this?

7 Answers   IBM,


what is command for executing files?

0 Answers   VSoft,


Categories