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
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 |
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 |
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 |
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.
how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?
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?
from where we will retrieve data for data driven tests in qtp?
what is active screen,keyboard view?
what is the difference between an Action and a function in real time
How to open an application through scripting?
hi radhaka plz tell me clearly to handle the earrors with out isng recovery scnerio this is sreenivas from delhi
How will you handle the situation when object is not captured during record?
how can i replace any text from the qtp script with some anothere text
I want different types of discriptive programming statments coded for different types of web-objects?Give syntax and example?
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?