How to connect to data base?
Answers were Sorted based on User's Feedback
QTP supports interaction with Database using ADODB.
Set con = createobject("ADODB.Connection")
Set rs = createobject("ADODB.Recordset")
'Create DSN(DataSourceName) for your database and specify
the DSN here
'You can also establish connection using Provider name
con.open "DSN=MyDsn;UID=ravi;PWD=sample123"
con.execute "Insert into emp values(2500, 'Ravi')"
'Retrieve data from database
rs.open "select * from emp", con
while not rs.eof
msgbox "ID = " & rs(0) & " Name = " & rs(1)
rs.movenext
wend
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / m.s.patil
You can write OLEDB script:
Set Con =CreateObject("ADODB.Connection")
ConString="Provider:SQLNCLI;Server=plantdev;DataBase=QAServe
r;UID=patil;PWD=password1"
Con.ConnectionString=ConString
Con.Open
| Is This Answer Correct ? | 0 Yes | 1 No |
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
What is diff betwee datatable.importsheet "path" and datatable.import
What is the difference between low level recording and virtual object.
Could any one tell me "How can i recognize my cursor position using QTP 9.2" Give me a scripts for this
How to test fly out menu in qtp?
Give some brief idea about a) Active x check b) Alt property check c) Applet object check d) Frame object check e) Multimedia links check f) Server side image check g) Table object check
What are the methods of the TextStream object that are used for reading from a text file?
I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible
How to send the qtp results file by email (Lotus notes).
how to associate object repository during runtime in qtp
How many types of status are there?
Why bpt?