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 |
How to send QTP scripts to our colleagues?
How can we test existence of a particular word in scentence using QTP tool. Thanks in Advance!!!!!
Explain how qtp identifies object?
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
can any one tell me how to select some text.i need the script for that
WHAT IS THE FRAMEWORK & ARCHITECTURE OF YOUR PROJECT
what are the difference between qtp8.2 to 9.0 surya
Hi How to retrieve data from web element line by line?
write the regular expression for date format of mm/dd/yy?
10 Answers CTS, HCL,
What is the basic concept of quicktest professional?
4. what is the use of Text output value in Qtp?
What is throw object?