How to connect to the Database from QTP?
Answer Posted / murali raju
Through scripting this is way to connect the database
Example:-
set conn=Createobject("ADODB.Connection")
Srvname="Driver={Microsoft ODBC for
Oracle}:Server=DBserver,UID=Sa,Password=sa"
conn.open Srvname
Set Rec = CreateObject("ADODB.Recordset")
SQL="select * from Users"
Rec.open SQL ,conn
Username=Rec.fields("employee name")
Msgbox Username
| Is This Answer Correct ? | 86 Yes | 20 No |
Post New Answer View All Answers
hi i am working with vbwindow on qtp.first i am openning qtp whenever open qtp my application not open that time generated error like "Runtime error 0" and fatal error:automation error how to solve this problem pls tell me
What do you mean by iteration?
What environment does qtp run in?
if our qtp vb Script may be Currepted then What we want do?
How can i initiate the objects to find uniquely in OR
Give me some real time point of way where exactly we can conduct audits?
Explain how Selenium is different from UFT?
Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?
What are table and db checkpoints?
How many tabs are available to view your test in a test pane and what are they?
In what occasion we can specify global sheet and action sheet?
For which type of projects the iterative model is not suitable?
can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks
How to use parameterization in qtp?
what is the diffrence bw qtp architectute and qtp framework?