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

Is QTP Supports SWT applications? If yes, can you write a sample script for opening a new package in eclipse.

0 Answers   IBM,


Can we do qtp testing without creating objects in Dbject repository? can we do it completely writing code i.e in expert view only. Are there any books for this?

7 Answers   Accenture,


Can any one tell the different properties and values of differnt objects like Browser,Page,link,webedit,webcombobox,webradio botton,webcheckbox and web button.Because I am facing a lot of problems in interviews with Descriptive Programing.I never worked on web Application...Pls help any one as soon as possible....

2 Answers  


Shared Object Repository is preferable while dealing with dynamic objects ok? descriptive prog also same? ok but why descriptive?(only for w/o application)

2 Answers   IBM,


Explain the features of quick test pro(qtp)?

0 Answers  


what are the mandatory and assistive properties of objects in QTP?What is attached text?Plz assist me with proper answer.

7 Answers   MBT,


If u r using descriptive programming to identify the object where do u write the script for those objects? do u write it in the expertview? plz do answer its urgent thanks advance.

3 Answers  


What is test object?

0 Answers  


How did you resolve conflicts present in Object Repository?

0 Answers  


What is the difference between QTP 8.2 object repository and QTP 9.2 object repository Any body have an please give Answer Mail id: nagireddy.sn@gmail.com

5 Answers   IBM,


Explain different checkpoints in qtp.

0 Answers  


Hi guys, can anyone explain me whats the method for reporting the QTP test results to teamlead or non-QA member (developer/PM)? Thanks in Advance!!!!!

2 Answers  


Categories