write a VBscript code to parametrize test script using test
data from sqlserver database?
Answers were Sorted based on User's Feedback
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 |
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 |
I Selected for TCS-Chennai(Contract to hire) position plz suggest me whether i have to join or not
What is the use of low level recording? How does it useful?
How can i learn Descriptive programming in QTP. Please reply.
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
in howmany ways you perfrom batchtesting
If the object property is changing very frequently, what was your approach?
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
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.
What is keyword view and Expert view in QTP?
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?
what is command for executing files?