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
How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..
how to fetch the values from grid? & qtp recogniges that grid as a webelement? what u do?
how to explain a claims and insurance project?
QTP script is not working on other's machine..
What are the Test design techniques you uses in ur project?
what is keyword driven testing in qtp?n how is it useful?
When QTP object wait time is 10 seconds, and in test script wait time is 5 seconds and in function library wait time is 2 seconds how much time does the wait occur? or which is given priority.
Tell me about your project? please help me how to tell about insurance project
Why we load add-ins in qtp?
Explain how Does Run time data (Parameterization) is handled in QTP?
How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.
how to create flat file datasubmission in qtp
What is checkpoints for qtp?
Tell me one scenario, the complex functionality you have automated in your project?
What are some test assets and related extensions of qtp?