Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Recordset Fields Collection

4 views
Skip to first unread message

donb...@my-deja.com

unread,
Jan 24, 2000, 3:00:00 AM1/24/00
to
Anyone know how I can grab the fields collection of a recordset and
dump it into an array?

Thanks,

Don


Sent via Deja.com http://www.deja.com/
Before you buy.

Tobias Martinsson

unread,
Jan 25, 2000, 3:00:00 AM1/25/00
to

> Anyone know how I can grab the fields collection of a recordset and
> dump it into an array?

It already is an array: the collection. However, you can do the following to
access elements:

# Get the name of the second field; first index is 0
$recordset->Fields(1)->{Name};

# Get the value of the field named "Country"
$recordset->Fields('Country')->{Value};

Then you can just dump it into arrays that way or you might use the built-in
Perl map-function to do it or you can use the GetRows() method of the
recordset to return a two dimensional array representing the fields.

--
Tobias

0 new messages