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

How to send QTP scripts to our colleagues?

1 Answers   Virtusa,


How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!!!!

4 Answers  


Explain how qtp identifies object?

0 Answers  


what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


can any one tell me how to select some text.i need the script for that

1 Answers  






WHAT IS THE FRAMEWORK & ARCHITECTURE OF YOUR PROJECT

3 Answers   Wipro,


what are the difference between qtp8.2 to 9.0 surya

1 Answers   Bally Technologies,


Hi How to retrieve data from web element line by line?

0 Answers  


write the regular expression for date format of mm/dd/yy?

10 Answers   CTS, HCL,


What is the basic concept of quicktest professional?

0 Answers  


4. what is the use of Text output value in Qtp?

1 Answers   Wipro,


What is throw object?

0 Answers  


Categories