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 |
When we use Object Spy? can we write QTP script before built is came in testing?
You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?
How to find Total no of Text Fields in the Page..Anybody please answer me..Thanks in Advance
How many ways we can parameterize data in QTP?
What is the Command used to start the QTP
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?
How do you learn the object in QTP?
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)
give me descriptive programing code sample flight application in qtp?
what is meant by iterative model?What is its working principle?What are its advantages and what are its drawbacks?
How to handle the exceptions using recovery secnario manager in Qtp?
list me out the shortcutkeys for some functionlities in the qtp for example to record ,to run ... etc