hacheb has asked for the wisdom of the Perl Monks concerning the following question:
I have a coupla questions about getting data from an access database. I can successfully connect to the base, issue queries, and get results. But some thing don't work out at all:
The database I'm querying holds about 2000 records. A "select *" query returns only a handfull of them (27 or 28 to be precise). The problems apparently stems from the fact that some field names contain a space (ie "QUANTITE DISPONIBLE") or a dash. If I initiate a query on a single column whose name does not contain any spaces or dashes then I get my 2000 or so records. Otherwise, the query does not return anything.
Backticking column names don't help at all. In fact, the query doesn't even bother to execute. Enclosing said names in square brackets does not help either.
That was the first note.
The second one is this:
Say I'm using two "trouble-free" fields name: REF and DESC.
The execution of the query "select ref, desc from my_table" returns all rows. But the query "select desc from my_table order by ref" does strictly nothing!
Also, can an illegal character of some kind screw up the fetching process?
Can some of you monks enlighten me 'cause I'm in the dark here.
Oh, I'm on linux, all cpan packages are up-to-date, unixodbc installed and properly configured, mdbtools installed.
|
|---|