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 |
Explain the types of object repository?
can i login a page by giving username and password and click on ok button through database parameterization.and if its yes then please write the code of that
Shall we add Local Repository to shared object repository,if yes,how we add
Use of Debug Viewer?
what is smart identification in qtp? pls any give details? thanks in advance
What is checking bitmaps?
What r the different filters in defect in quality center
write a vb script to print even numbers from 1-50?
6 Answers Kclink Technologies, Logica CMG,
1.what is test automation life cycle?
hi how could i get installation guide for QTP 9.0 on XP help me for this !!!!!
how will u choose a tool for test automation ?
CAN ANY ONE PLEASE EXPLAIN DIFFERENT TYPE OF FRAMEWORKS USED IN QTP?EXPLAIN EACH OF THEM?..POST TO VANILKUMAR_1981@YAHOO.CO.IN