Jim
|
Posted: 05/12/2004, 12:51 PM |
|
Hi,
I have a problem using MS Access tables that have spaces in the field names. For reasons to complicated to go into here, the table structures basically can't be changed, so that's not a solution for me.
Here's the code:
Seems fine, but when executed, here's what apache gives in the logs:
DBD::ODBC::db prepare failed: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Company Name'. (SQL-42000)(DBD: st_prepare/SQLPrepare err=-1) at C:/Documents and Settings/Jim/My Documents/business/Clients/NET/development/./Common.pm line 1804.,
It seems to be dropping the [ ] when actually performing the query. Note - another table in the project that does NOT have spaces in any fields is working just fine.
Has anyone seen this type of behavior before? Any ideas how I can fix it?
Thanks,
-Jim
|
|
|
Krishna Malyala
|
Posted: 05/18/2004, 7:32 AM |
|
Hi Jim,
Just Change your table name 'Company Name' to 'Company_Name'
This will work. This is due to spaces in the table. use Underscores insted of space, The Same goes for Column names use Underscores.
Thanks
Krishna
|
|
|
|