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 compare two excell sheets by using vbscript??

2 Answers  


Interviwer asked, How many years exper.. on QTP? I said, total 2 yrs exp in manual and QTP. QTP only current project arround 3 months. then interviewer ask , HOW BOLD YOU QTP? What you say?

1 Answers  


In QTP how to interact tool and application build?

2 Answers  


Is it possible to call out to Java from QTP?

2 Answers  


What is the Difference between Environment variable and Globle variable,.. anybody can give me answer..Thanks in advance...

4 Answers   IBM,


Why is Client side image is preferred over server side image?

0 Answers  


What are the properties you would use for identifying a browser & page when using descriptive programming ?

2 Answers  


how many types of actions r there? what r they? explain? pls give any one answer?

3 Answers   IBM,


I want to execute 1st row of the local sheet and 3rd row of the global sheet parellely. write script to execute

2 Answers   IBM,


Diff between WEB APPLICATION AND CLIENT-SERVER APPLICATION?

2 Answers  


Does QTP run in any environment?

0 Answers  


for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b if u found exact answer please getback to me? raju.ippali@gmail.com 9823257761

1 Answers  


Categories