CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Perl

 Query to MS Access seems to drop []

Print topic Send  topic

Author Message
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

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 http://support.yessoftware.com.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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