Forum Discussion

mikev's avatar
mikev
Contributor
14 years ago

DDT - Get & Set Row?

Does anyone know of a way to set a row (as in the number) in a data table?  How about getting the number of rows?  I haven't seen anything about rows.  I know I can get the column count, but not the row.

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    This has to do with how the DDT object gets the records.  It is a forward only cursor on the data set which does not calculate the count of rows and records a head of time but only marks when you've reached the end of the file.  If you want to access rows directly in a data set, you can use ADO objects to create your own queries and record sets that will do that for you.
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Looking over the other thread and your conversation with Alex, what problem are you trying to resolve by checking row counts?
  • Same problem Robert.  I thought if I could get a handle on the row itself (for any sheet) I can code my way around.  In the Data Driven aspect of QTP there are getCurrentRow(), setCurrentRow, getRowCount(), etc. methods.