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.
In reply to Re^2: Fetching data from Access using DBI
by hacheb
in thread Fetching data from Access using DBI
by hacheb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |