in reply to Re: Fetching data from Access using DBI
in thread Fetching data from Access using DBI
ok, there's progress thanks to you. I'm using ODBC. Quoting field names does work indeed.
There still remain one problem; the query returns only a handfull of rows instead of the 2000 expected. Which brings me back to this 'illegal character' thing I was refering to in my first post.
As the data fetching occurs, something must go wrong somewhere and stop the process. I'll have to identify the offending column.
Can you explain why trying to order the result set fails?
$query = $dbh->column_info('','',$table,''); $column_info = $query->fetchall_arrayref(); for $i ( 0 .. $#{$column_info} ) { $fields .= qq| "$column_info->[$i][3]",| } chop $fields; $sql = qq|SELECT $fields FROM $table ORDER BY "REF"|; $query = $dbh->prepare($sql) or die "could not prepare $sql : $DBI::er +rstr\n"; $query->execute or die "could not execute $sql : $DBI::errstr\n"; $result = $query->fetchall_arrayref();
This returns nothing. And does not produce any error neither.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Fetching data from Access using DBI
by mje (Curate) on Aug 11, 2009 at 09:19 UTC | |
by hacheb (Novice) on Aug 11, 2009 at 10:37 UTC | |
|
Re^3: Fetching data from Access using DBI
by bart (Canon) on Aug 11, 2009 at 10:03 UTC | |
by hacheb (Novice) on Aug 11, 2009 at 10:52 UTC | |
by mje (Curate) on Aug 11, 2009 at 15:50 UTC | |
by hacheb (Novice) on Aug 11, 2009 at 19:24 UTC | |
by mje (Curate) on Aug 12, 2009 at 07:48 UTC | |
| |
|
Re^3: Fetching data from Access using DBI
by Anonymous Monk on Aug 13, 2009 at 11:57 UTC | |
by Anonymous Monk on Aug 13, 2009 at 11:58 UTC | |
by Anonymous Monk on Aug 13, 2009 at 12:03 UTC |