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 |
when there is a task that gets repeated in multiple scripts what do you do in QTP?
What is the Difference between test object and run time object?
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
what is smart identification?
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.
How to get Links count in an web application,without descriptive programming?
How to make an Action as reusable?
Hi, i want download attached files in test plan area from QC to local drive in my system using QTP script. Please help me
what does it mean when a check point is in red color? what do u do?
how can i call function (which has link with excell sheet at a remote location) within another function
How can we do this one ? at runtime qtpwindow and browser aren't disply on monitor (or) aren't visible on desktop?how?
How to Display last item of a Combobox by using QTP?