On Sun, Feb 23, 2003 at 11:05:33AM +1100, Ron Savage wrote: > > 4) Starting at what is now line 295, we see: > my $desc = $dbh->selectall_arrayref("DESCRIBE $table", { > Columns=>{} }); > my $ordinal_pos = 0; > foreach my $row (@$desc) { > > Inside this for loop, I changed all references from $row->{field} to > $row->{Field}. This applies to all, repeat all, keys of %$row, not > just Field. I can't image why you assume lower case keys here.
Because I was using: $dbh->{FetchHashKeyName} = 'NAME_lc'; To make it general the code needs to be my $desc_sth = $dbh->prepare("DESCRIBE $table"); $sth->{FetchHashKeyName} = 'NAME_lc'; my $desc = $dbh->selectall_arrayref($desc_sth, { Columns=>{} }); > 5) At the end of this sub, I added code to return something :-): > \%col_info; That's not right. It was returning the $sth (see the definition of column_info). An explicit return $sth; would be better. I'll make those changes to my version. Thanks. Tim.