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

when there is a task that gets repeated in multiple scripts what do you do in QTP?

2 Answers   Ordain Solutions,


What is the Difference between test object and run time object?

0 Answers  


I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible

0 Answers  


what is smart identification?

7 Answers  


Hi Guys, In one of my interviews, I was asked to Write a paragaraph explaining how much scripting I did in QTP? I don't know where to start and what to write. So I need your help in writing that.

1 Answers  






How to get Links count in an web application,without descriptive programming?

8 Answers  


How to make an Action as reusable?

1 Answers  


Hi, i want download attached files in test plan area from QC to local drive in my system using QTP script. Please help me

3 Answers  


what does it mean when a check point is in red color? what do u do?

4 Answers  


how can i call function (which has link with excell sheet at a remote location) within another function

0 Answers  


How can we do this one ? at runtime qtpwindow and browser aren't disply on monitor (or) aren't visible on desktop?how?

1 Answers  


How to Display last item of a Combobox by using QTP?

10 Answers  


Categories