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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

is it possible to add sheets to excel at runtime

3405


What are output values and why they are used ?

701


how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)

1527


How can I change object description or check point values in qtp?

646


how will you load the test cases in ddt?

1676






What are the challenges u faced in testing with crm domain? How u overcome with?

1588


How will you handle java tree in qtp?

712


www.icici.com ,after this.. home page wll came, in this page what r the items we r going to test for manual and what are items we r going to test for QTP... explian clearly with example

1819


Where can I find and view run-time data table?

611


1.explain end to end process of qc,2.how many tabs are in qc9.0,qc10.0 3.what is review, how many reviews are following in aproject 4.how will you get the requirements 5.why do we choose testing 6.how to export tc's and requirements to qc through add-ins

1530


Hi, I am using 2 excel sheet.First excel sheet works fine with the script, if it opens the 2nd excel sheet,it works fine,but after finish all the rows it is giving the following error in the following line. InValid Procedure call or argument Line (178): "Browser("name:="&result,"application version:=internet explorer 7").Page ("title:=bgt.*", "index:=0").WebList ("name:=SearchType","html id:=Select1","location:=0").Select SearchType1". I have seen a web article says that,If we use any vbscript friendly name it may gives the above error-Invalid procedure call or argument not sure,Am I using any VBScript frienlyName? in the above line? [but the same line is perfecly working for first Excel ] It is little urgent. Any Help Thanks you

1577


Hi All, we are using QTP Automation Scripts to test SAP. I recorded QTP Automation Scripts in English-based SAP GUI. Now we have to test a French-based SAP sytem and use the same scripts. The QTP scripts are failing when executed on the French-based SAP System due to Object Recognition Issues. What can we do? Do I re-record the scripts in the French-based SAP system?

2423


What is difference between Recording time object identification and Run time (Execution) time.

1102


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

711


why you have standardized functions? plzzz guys with real time exp. do answer

1517