Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how do u retrieve data from a database ? i.e. i want to
retrieve 2nd record only from a database ? write code for
this. by using ADODB connecton, RSOBJ and using a FOR loop
we can retrieve all the records( ex: if we give query as
select * from emp). but i want only 2nd record. so how to
acheive this.

Answer Posted / praveen

set dbobj=createobject("adodb.connection")
dbobj.provider="Microsoft.jet.oledb.4.0"
dbobj.open "<path of .mdb(msaccess)file>"

set rsobj=createobject("adodb.recordset")
QRY=select * from emp" 'for example
rsobj.open QRY,dbobj

for i=1 to 2
rec=rsobj.getrows(3,0) 'retrieve 3 records starting from 0
rec1=rec(0,i)
next

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain in brief about the quicktest professional automation object model?

906


when u script reveiwing in which area u more concentrates?

1841


unique properties of button,edit box, radio button,check box?

4439


Shall we add Local Repository to shared object repository,if yes,how we add

7358


What are the different kinds of test steps?

1037


Is it possible to call from one action to another action in qtp?

985


How many types of recording facility are available in quicktest professional?

1057


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

1112


Can U Explain about QTP tool from older version to latest version also its differences?

1943


How can you send user defined messages to test report?

1001


WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT

2100


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

950


what is clean sweep?

2234


On the website, the protocol has been changed https: to https what you will do? Tell me your approach?

958


Define Error Pane of UFT?

1067