How to retrieve the data from database?

Answer Posted / asn

dim con,cmd
set con=createobject("adodb.connection")
set com=createobject("adodb.command")
con.open"provider=sqloledb.1 or ora
oledb.1;server=servername;uid=uid;pwd=password;database=data
sourcename"
cmd.activeconnection
cmd.execute"select*from tablename"

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of recording modes?

550


There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code

1219


What is the difference between rational rose and QTP?

1782


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

1436


why should we give deliver good quality software?

1638






How to test background color and dynamic images during run time can you put the check point for moving objects?

1459


what are the limitations of smart identification in qtp 9.0

1934


before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...

7249


HI, pls help me on this, iam not able to capture getcelldata value in javatable... msgbox javawindow("").javatable("").getcelldata(3,3) but it diaplays empty...

2402


What is text check point and text area check point?

620


I had installed QTP 9.2. It is working fine but whenever I open QTP, it is trying to reinstall the below-mentioned files again and again "QTP92PS82UPGRADE.exe", "recogn.dll". If anybody has these files, please provide those files in this site or you can send that files to my mail id also (lravi4u@yahoo.com). If you don't know where the files will be in the QTP, search in the QTP software CD or path of QTP program installed (C:\Program Files\Mercury Interactive\QuickTest Professional)

1470


To which environments does quicktest professional supports?

551


Where we can use the analog mode and where we can use the low – level mode?

576


how to convert 100 into hundred repees only and viceversa

1457


How to check bitmap output value?

635