write progamming connecting QTP to database sql? this is
question asked by interview? please give sql, pl/sql related
answer?pls any answer this?

Answers were Sorted based on User's Feedback



write progamming connecting QTP to database sql? this is question asked by interview? please give ..

Answer / manish deshmukh

Set con = Createobject("ADODB.Connection")
set rs = Createobject("ADODB.recordset")
con.connectionstring="DSN=xyz;UID=abc;PWD=pqr;"
con.open
SQL="select * from manish"
Set rs=con.execute(SQL)

Is This Answer Correct ?    7 Yes 1 No

write progamming connecting QTP to database sql? this is question asked by interview? please give ..

Answer / rangarao

Set myconn=CreateObject("ADODB.Connectionn")
myconn.Open
("Provider=OraOLEDB.Oracle;DataSource=Your_Oracle_Database;o
SAuthent=1;")
if(myconn.state=1) Then
Set rec=myconn.Execute("query")
while rec.EOF<>TRUE
msgbox rec.fields(colname)(We can also Specify column index)
rec.MoveNext
wend
End if
rec.Close
myconn.Close

Is This Answer Correct ?    2 Yes 0 No

write progamming connecting QTP to database sql? this is question asked by interview? please give ..

Answer / bharanikumar . r

Hi all,

I had some idea about this question

Answer:

First we need to create the object for connection

ie.
Set a = Createobject("ADODB.Connection")
set b = Createobject("ADODB.recordset")

Then with the help of created object we will define the SQL
Query

For ex:
Opening the data from SQL:

step 1 - create the connectivity whether manually or qtp
step 2 - a = Select * from exmployee with the connectivity
with DSN

and we have to declare the array size also because once a
data retrieved from the database it will stored in array
format --

Thank u

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More QTP Interview Questions

In this bellow script QTP is not able to getting no. of Links from my Browser. Set desc=description.create desc("micclass").value="Link" Set obj=Browser("creationtime:=0").page("title:=.*").childobjects(desc) msgbox obj.count I am getting "General Run Error".Why QTP is not supporting my Browser,but its running fine in other system.Please help me to overcome this problem.

1 Answers  


what is objectidentification?

2 Answers  


write is the code for regular expression in QTP

2 Answers   IBM, Infosys,


hi all need one help . i want scroll down and up but thing the holl page is taking webtable. i need to scroll down and up using scroll tab any bodu knows plz help its urjent regards balaji

5 Answers  


whenever U using QTP,Test Director, Why we using separate Bug tracking tool?

1 Answers  






What is the use of Regular expression?

5 Answers  


distinguish between old version and new version QTP features.

0 Answers   CTA,


What is Cross browser testing? Does UFT support it?

0 Answers  


How to differentiate the webedit field like user name and password? Please tell any other best answer is ther

3 Answers   Navis,


what are the disadvantages of descriptiveprograming

5 Answers   GE,


need clear explanation of actions and functions in qtp with examples?can anyone suggest me gud site for that other than qtp manual?

2 Answers  


What is throw object?

1 Answers   AZTEC,


Categories