[thelist] ADO cursor - best solution for count and page throughprocedure

Scott Dexter dexilalolai at yahoo.com
Wed Mar 31 10:11:24 CST 2004


>         rs_OfficeList_array = rs_OfficeList.GetRows()
> 
>     return a _bidimensional_ array where the first dimension has a
> size of
> 0 (zero).
> 

GetRows() always returns a two dimensional array, even if you're
getting a singular value --it's still returned as a recordset. From
the docs:

The first subscript identifies the field and the second identifies
the row number. For example, intField represents the field, and
intRecord identifies the row number:

avarRecords(intField, intRecord)

To get the first field value in the second row returned, use code
like the following:

field1 = avarRecords(0,1)

To get the second field value in the first row, use code like the
following:

field2 = avarRecords(1,0)

(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dao360/html/damthgetrows.asp)

Hope that helps :)

sgd


More information about the thelist mailing list