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
I created 3 actions in test suppose I want to run action 1 in single time, action 2 is 4 time what I do?
If the objects hierarchy is changing from build to build, then how you will handle that condition?
Hi there, I've installed a trial version of QTP to see if it works with my product but I cant automate selecting windows from a tree view? Can anyone give me any pointers? Many Thanks
What is test object model in quicktest professional?
How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?
Can any body please tell me the steps of keyword driven framework of QTP.
How to check which add-ins are associated with a test in qtp?
I have many listboxes in my application. I have to check whether the contents inside the listboxes are in sorted order or not..can anyone please send the code as early as possible
If I give some thousand tests to execute in two days what do you do?
What is throw object?
Where is the resultset of a sqlquery (which is fired by rsobj.open sqlquery,xxxx,xxxx) stored ?
What is accessibility check point?
In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.
What is the default object synchronization timeout in qtp?
If object is not recognized by qtp but the object is standard object what is your approach?