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
Explain in brief about the quicktest professional automation object model?
when u script reveiwing in which area u more concentrates?
unique properties of button,edit box, radio button,check box?
Shall we add Local Repository to shared object repository,if yes,how we add
What are the different kinds of test steps?
Is it possible to call from one action to another action in qtp?
How many types of recording facility are available in quicktest professional?
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?
Can U Explain about QTP tool from older version to latest version also its differences?
How can you send user defined messages to test report?
WAT IS DATA BASE AND XML CHECK POINT ?HOW TO IMPLEMENT IT ... GIVE PROPER EXAMPLE FOR IT
Where we can use the analog mode and where we can use the low – level mode?
what is clean sweep?
On the website, the protocol has been changed https: to https what you will do? Tell me your approach?
Define Error Pane of UFT?