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

What is the use of Accessibility check point?

8 Answers   BirlaSoft,


UFT 12.02 which ALM version will support

0 Answers  


Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?

1 Answers  


How we can add actions in the test using QTP?

2 Answers  


Can any one tell me Difference between Keyword Driven Frame work and Hybrid framework? Its Urgent.

2 Answers   IBM, Wipro,






why qtp supports vbscript? and not for others just like cgi,phython,shell,perl,html and all..

4 Answers   Cap Gemini,


What is a checkpoint? How many check points are there in qtp?

0 Answers  


How can we upload pdf files in qtp?

1 Answers   Syntel, TCS,


What do you mean by checkpoints in qtp?

0 Answers  


Hi,The question is write a script for the following scenario. scenario:in a job portal i entered QTP 3yrs testing then click search button.then it displays results like Test lead bangalore (here is a checkbox). Test lead hyderabad check box so on... question is if test lead position in bangalore then checkbox shld be enabled automatically..

4 Answers   Thatavarti Technologies,


How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

5 Answers  


How can you pass value one action to another action?

0 Answers  


Categories