ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
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.
 Question Submitted By :: Allurbabu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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
# 1
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 1 No
Cheryl
 
  Re: 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
# 2
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
Praveen
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
How you automate test scripts Novartis1
How we can capture the dynamic object ex:(rotating globe) in the web page with time gaph is 5 sec.. IBM2
How to supress warnings from the "Test results page"? BirlaSoft4
actuall wat my doubt is:while doin regression testin we enter all +ve & -ve data....system has to accept +ve and reject -ve data.in such case we get a popup window sayin that wrong entry...now i wan to overcome this popup window..how do i go further....plz explain.i tried thru rec.scenario but of no use.  1
In QTP, Give the difference of Global sheet and Local sheet in datatable?  1
Tell about descriptive programing in qtp8.2? GE4
Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..  1
How can I replace all the text from the QTP script with some other text. Livetek1
what is the purpose of QTP?  2
if the excel sheet specified in script is not there,we get run time error how to handle the error ,please anybody explain me in detail Quinnox1
can u give one scenario for for PopWindow Exception & write Code for that? Cap-Gemini1
Please explain about unicode compatibility in QTP. how we can able to use it. Please help me  1
how do u import the test cases written in excel sheet to qtp? and how do u generate the script in qtp for the testcase in excel sheet? plzzzz do answer this question thanks in advance  4
By default Action1 runs first in QTP. Is it possible to start the run with Action2? Virtusa7
how to select the work for complete automation and one more thing when u are going to choose automation Fidelity2
How to make an Action as reusable?  1
How to Import data from a ".xls" file to Data table during Runtime.  1
What are the abbreviations for tsr and mtr? Ordain-Solutions14
It is regarding VBScript, how to export our function results to ExcelSheet through VBscripting. Ex: I have written add function, that result should export to Excel.  3
Take a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system desktop appears.  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com