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 how many ways you perform batchtesting?
Hi, every one aim new to automation testing(QTP),aim looking for software versions any. If any one can HELP me that will be great. Thank u.(9620427211,Bangalore)
How do you invoke an application using the step generator in qtp?
What is the pros and cons between QTP and Rational Robot
Can you import and export data from XLS and how?
i need qtp tutorial. pls send it to sridhar.k151@g mail.com
how to load vbs file to qtp through scripting. plz provide the code.....
What exactly a frame Work means?what are the different type of frameworks done in QTP?why the caption for QTP given as advanced keyword driven?
i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.
How can i check elements sorted in dorpdown using qtp..
What is output value in QTP? Why do we use the output value in QTP?How many types of output values are there in QTP? what are their respective usage in QTP?
How can get count of list box?