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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / cheryl
I think you need to set your for loop so that it reads only
2 records or as many records from the record set that you
want. i.e for i = 1 to 2
read the next record
next
this way you have the 2nd record
| Is This Answer Correct ? | 0 Yes | 2 No |
How can you quit from Action.
What is User defined function in QTP
Hi, i am rani ,i am putting 1+years of fake exp ,so pls anyone explain how i get project (in real time) ? how it is tested ex: in banking ,test the number of textboxes in one window
hi nani my doubt is how does qtp process metrix related to software process.
Give a comment on Regular Expressions using QTP?
Diff B/w Webserver and Client Server
What is the main difference between QTP 8.0& QTP 9.2.And what r the features and benefits of QTP.
How do you invoke an application using the step generator in qtp?
Hi, Can anyone tell me what type questions can be ashed in interview on QTP?
Reverse a string keeping the words in the string as it is. E.G. "Quick Test Professional" O/P "Professional Test Quick"
what is the difference between Automation object model(AOM) and test object model(TOM)
Where we can use the synchronization?