Answer Posted / ravi
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 |
Post New Answer View All Answers
I need to pull the data from the page which in row, column vice into excel sheet, how can it be done using QTP? eg: Name Dept xyz gdty i need the same data to be exported in excel sheet.
How we can import data from database?
I need Major Help with a Script I recorded in QTP 9.5. I am recording scripts for a Web-based application(s) I have all the URLs for each application in Excel spreadhsheet so that QTP can pull that particular application from the spreadsheet and run it. The problem is QTP isn't recognizing one particular URL so when I hit run in QTP to run this script it opens the internet Explorer but isn't open the URL I have in the Excel spreadsheet. I've retyped the URL and still QTP won't open this Particular one for some reason. The site its self is working fine but for whatever reason QTP won't open it. How do I resolve this? I have a deadline of next Friday the 7th to complete this task so please help me in any way you can. Thanks in advance
How to connect to a database?
if our qtp vb Script may be Currepted then What we want do?
How do client side image and server side image work?
What is the syntax to call one action in another?
How to data driven test for Win objects in QTP ?
hi nani my doubt is how does qtp process metrix related to software process.
Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement
What are the different types of recording modes?
Hi ,Can any one pleas explain how to test splash objects using QTP?
Give me some real time point of way where exactly we can conduct audits?
What is the difference between Keyword Driven test and Data Driven test?
What is Port testing. Whhen will you perform?