how i will connect oracle or microsoft acess database
through manually written Script

Answers were Sorted based on User's Feedback



how i will connect oracle or microsoft acess database through manually written Script..

Answer / sashikanth

DIM ADDCON
DIM RECSET

SET ADDDCON = CREATEOBJECT("ADODB.CONNECTION")
ADDCON.OPEN "DSN= ;UID= ;PWD= ;"
SET RECSET = ADDCON.EXECUTE("SELECT.....)
WHILE RECSET.EOF
.........
.........
WEND
SET ADDCON = NOTHING
SET RECSET = NOTHING

Is This Answer Correct ?    0 Yes 1 No

how i will connect oracle or microsoft acess database through manually written Script..

Answer / baba fakruddin

'This is for Microsoft Access

dim con,rs

set con=createobject("adodb.connection")
set rs=createobject("adodb.recordset")

con.provider="microsoft.jet.oledb.4.0"

con.open "d:\testdata.mdb"
rs.open "select * from emp",con

do while not rs.eof
vbwindow("form1").vbedit("val1").set rs.fields("v1")
vbwindow("form1").vbedit("val2").set rs.fields("v2")
vbwindow("form1").vbbutton("validate").click

rs.movenext
Loop

' Oracle Connection

con.open
"provider=oraoledb.1;server=localhost;uid=scott;pwd=tiger;datbase=testdata"

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More QTP Interview Questions

what type of test cases tou will automate?

4 Answers   Google,


How to get line numbers in your editor in expert view?

2 Answers  


Hi, I am trying to automate the web application for generating Reports.I am facing issue with IE while running the script. After 4 report IE crashes.I am using QTP 9.5 with IE version 7. Can anubody give me solution for this issue. Thanks in advance-Jyotsna

0 Answers  


Explain the features of quick test pro(qtp)?

0 Answers  


How do we retrieve the content from a text box in a web page

2 Answers  


how do you do database testing in qtp

5 Answers   NIIT,


how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0

0 Answers  


How QTP recognizes Objects in AUT?

8 Answers   Blue Star,


What is the scripting language used in QTP?

11 Answers   IBM,


What is the difference between QTP and WinRunner? Why do you choose only QTP for automation among remaing tools like Rational robot and silk test? Write the VBscript for any functionality in your project ? What is the cost of QTP ? If you entered into yahoo mail with your valid user name then you will get FOR EXAMPLE , " welcome to krishna " on the top of inbo page , how can you test it in QTP? What type of testing you can do, when we gave you 5 screens and how can you test that application? What type of framework you are using in your company and explain it?

0 Answers   CTS,


Hi All, I am 4 yrs experieced in manual testing and new to automation tool QTP. Iam trying to learn it thru online and material i have.I am able to understand but unable to trace out which method or function to be used where necessary in VB Script. How come we know the functions or methods to be used to open a window when clicking on button or so...Pls suggest me.How can i proceed further to apt VB Script.

0 Answers  


What is Test Fusion Report in QTP?

0 Answers  


Categories