write progamming connecting QTP to database sql? this is
question asked by interview? 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? pls any answ..

Answer / nagapawan

hello not for sql server, this question is asked by me in
sql , pl/sql

nagapawan

Is This Answer Correct ?    0 Yes 0 No

write progamming connecting QTP to database sql? this is question asked by interview? pls any answ..

Answer / prathyusha

set odb=createobject("adodb.connection")
odb.connectionstring="provider=sqloledb;server=zz;database=xx;user
name=xy;password=as"
(if we want to work with sql database then we can go for sqloledb provider)
odb.open
if odb.state="1" then
msgbox "connected to database"
else
msgbox "not connected to database"
end if

Is This Answer Correct ?    0 Yes 0 No

write progamming connecting QTP to database sql? this is question asked by interview? pls any answ..

Answer / raj

objConnect=CreateObject("ADODB.Connection")
objRecordSet=CreateObject("ADODB.RecordSet")

strConnection="Driver=SQL
Server","Server=LocalSQLServerName","Database=master","UID=s
a","PWD=sa"

objConnect.OPEN strConnection

strQuery= "select * from master"

objRecordset.Open strquery, objConnect

Thanks,
Raj

Is This Answer Correct ?    0 Yes 1 No

write progamming connecting QTP to database sql? this is question asked by interview? pls any answ..

Answer / ajit

Dim cn,rs

Set cn = createboject("ADODB.CONNECTION")
Set rs = createobject("ADODB.RECORDSET")

cn.open "DSN=D1"
rs.open "select empno,empname from emp",cn

while
rs.EOF<> TRUE
print rs(empno)&" "rs(empname)
rs.movenext
wend
cn.close
rs.close

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More QTP Interview Questions

in how many ways you perform batchtesting?

2 Answers   Sapient,


Hi, every one aim new to automation testing(QTP),aim looking for software versions any. If any one can HELP me that will be great. Thank u.(9620427211,Bangalore)

0 Answers   ME,


How do you invoke an application using the step generator in qtp?

5 Answers  


What is the pros and cons between QTP and Rational Robot

0 Answers   Virtusa,


Can you import and export data from XLS and how?

4 Answers  






i need qtp tutorial. pls send it to sridhar.k151@g mail.com

0 Answers  


how to load vbs file to qtp through scripting. plz provide the code.....

2 Answers   IBM,


What exactly a frame Work means?what are the different type of frameworks done in QTP?why the caption for QTP given as advanced keyword driven?

4 Answers   Satyam,


i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.

0 Answers  


How can i check elements sorted in dorpdown using qtp..

1 Answers   Value Labs,


What is output value in QTP? Why do we use the output value in QTP?How many types of output values are there in QTP? what are their respective usage in QTP?

14 Answers   IBM,


How can get count of list box?

0 Answers  


Categories