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
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 |
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 |
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 |
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 |
In project module it contains 3-ok buttons with same properties who qtp identify its objects while runing ??
How to replay a script in qtp?
Synchronizing test
Hi,will U Please Provide me details certification for QTP &QC and also please provide me the Material also. Send to mail:jjaanu2mail@gmail.com
What is the difference between a Function and Procedure in QTP?
What is the difference between Dim And Redim
4 Answers Hotel Jobs, IBM, Microsoft,
in qtp how i can retrive from a browser how many links are there.means total no of links used in a browser
How exactly you start scripting in QTP? In the interview he was not satisfied with my answer.Please post what is correct answer.
What is Maximum synchronization time out in QTP(By Default is 20sec). Anybody can answer it. Thanks in advance.
What is a data driven test in qtp?
What is object repository in qtp?
Is it possible to change the values of analog recording?