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 compare two excell sheets by using vbscript??
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?
In QTP how to interact tool and application build?
Is it possible to call out to Java from QTP?
What is the Difference between Environment variable and Globle variable,.. anybody can give me answer..Thanks in advance...
Why is Client side image is preferred over server side image?
What are the properties you would use for identifying a browser & page when using descriptive programming ?
how many types of actions r there? what r they? explain? pls give any one answer?
I want to execute 1st row of the local sheet and 3rd row of the global sheet parellely. write script to execute
Diff between WEB APPLICATION AND CLIENT-SERVER APPLICATION?
Does QTP run in any environment?
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