How to connect to oracle(sqlserver) database to QTP
Answer Posted / madhumitha
we can connect to oracle database throught conntection
string....
code for connecting to db
set con=createobject("ADODB.Connection")
set rs=createobject("ADODB.Recordset");
con.ConnectionString="DRIVER={oracle in orahome92};SERVER=
(servername);UID=(username);PWD=(password);DBQ=dbserver"
con.open
query="select * from tablename"
rs.open query,con
while not rs.EOF
i=0;
msgbox(rs(i))
i++
rs.move next
wend
rs.close
con.close
set rs=nothing
set con=nothing
any coments always welcome
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is the new version of qtp which is recently released in the market?
What are the different types of qtp test assets and their extensions?
Explain the check points in quicktest professional?
give me the code to save all messages of inbox of gmail into a folder and notepad
Step 3&4 are repeated until an the object in recognised uniquely.
Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing
How to add verification steps to tests?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))
how to convert 100 into hundred repees only and viceversa
What are the different attributes used with regular expression?
Without using gui map editor we can recognize the application in winrunner ?
I used child objects to get the no of weblist present in the weblist.now i need to select the items present in each weblist ?How to do so
What is a checkpoint? How many check points are there in qtp?
What are the types of object repositories? Which one is you are using?