Problem : using ADO in ASP

Jim Madsen jmadsen at xmission.com
Tue Feb 8 13:19:26 EST 2000


I had the same problem using ADO with Access.

Below is a section copied from the ADO documentation.  The point to note is
that GetRows() returns an array where the first subscript identifies the
field and the second identifies the record number.  It basically does return
a sequence of columns, but that is how it is designed to work.

You can use it as is by reversing your subscripts, or run it through a quick
loop (depending on Recordset size) and convert the columns to rows.


Copied from Help File:

Syntax

array = recordset.GetRows( Rows, Start, Fields )

Return Value

Returns a two-dimensional array.

Use the GetRows method to copy records from a Recordset into a
two-dimensional array. The first subscript identifies the field and the
second identifies the record number.


Hope this helps!

Jim



Steve Holden wrote in message <389ED9A0.62DB5D5A at bellatlantic.net>...
>Mark Hammond wrote:
>>
>> "Steve Holden" <sholden at bellatlantic.net> wrote in message
>> news:38998BC0.2760828B at bellatlantic.net...
>> > Aaarrrggghhh ...
>>
...
>(<COMObject Execute>, -1)
><p> (L'row3col1', L'row1col1', L'row2col1', L'row4col1')
><p> (L'row3col2', L'row1col2', L'row2col2', L'row4col2')
><p> (L'row3col3', L'row1col3', L'row3col3', L'row4col3')
>
>which is why I said GetRows appears to be returning COLUMNS: as I
>iterate over the result of GetRows, it would seem logical (captain)
>for the tuple to be the columns of that row.  But this is very
>definitely NOT what I am seeing.  Which makes me confused.
...





More information about the Python-list mailing list