adspace


How to connect to oracle(sqlserver) database to QTP

Answer Posted / adarsh (saama technologies)

set con=createobject("ADODB.Connection")
set rs=createobject("ADODB.Resultset");
con.open"provider=oraoledb.1;server=
(servername);UID=(username);PWD=(password);DB=dbserver"
rs.open query,con
Do while not rs.EOF
i=0;
msgbox(rs(i))
i++
rs.move next
loop
rs.close
con.close
set rs=nothing
set con=nothing

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When to use shared and local object repository?

1168


How are actions and functions different in QTP?

1160


How to give a call to another action from one action?

1175


any body can you help me what is the script to automate an comand promt

2577


Can you brief the hurdles you faced during Automation testing?

1146


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

3017


can any body tell me how i create a simple script and apply output value on it .pls send me a step by step process

1876


Define Environment Variable in UFT and its uses?

1155


What is the new version of qtp which is recently released in the market?

1167


we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

2156


Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar

3313


HOw to add the recovery file at runtime to the test file .

2299


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

2024


hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.

2437


what kind of frame work you used in your last project?

2418