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

I am Using QTP 9.1 version. I have created a Shared Object Repository. The size of Shared Object REpository is 9 MB. In my system i am able to execute the script very flexibly and it is very fast. But if i copy the same code into other system with the same configuration, it is executing very slowly(i.e dam slow). It is not happening in all machines it is in only some machines. Can please any one give th esolution. It is high priority to me as i need to give demo to client on their machines.

4 Answers   TCS,


how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?

3 Answers   HCL,


After coming to know that QTP could not identify non-standard objects, we set those non-standard objects as virtual objects using Virtual object wizard. But how can we identify that qtp could not identify non-standard objects?

6 Answers  


from where we will retrieve data for data driven tests in qtp?

3 Answers  


what is active screen,keyboard view?

2 Answers   BirlaSoft,






what is the difference between an Action and a function in real time

4 Answers  


How to open an application through scripting?

11 Answers  


hi radhaka plz tell me clearly to handle the earrors with out isng recovery scnerio this is sreenivas from delhi

2 Answers  


How will you handle the situation when object is not captured during record?

2 Answers  


how can i replace any text from the qtp script with some anothere text

1 Answers   Livetek,


I want different types of discriptive programming statments coded for different types of web-objects?Give syntax and example?

2 Answers  


If you are using descriptive programming and you have two objects with the same name, so you are identiying them by name and index, how can you avoid errors if a third object with the same name is added at the begining of the page?

4 Answers  


Categories