CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> Perl

 Query to MS Access seems to drop []

Print topic Send  topic

Author Message
Posted: 05/12/2004, 12:51 PM


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/./ 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?


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.

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.