CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Access Query error

Print topic Send  topic

Author Message
David Hermansen
Posted: 08/27/2003, 10:09 AM

Why do sortable columns produce this error? It works in Access 2000 with ' around the Model Number (ORDER BY 'Model Number')

Error: Syntax error (missing operator) in query expression 'Model Number'. (Microsoft JET Database Engine)
SELECT * FROM [Laptop computers] ORDER BY Model Number
Alice
Posted: 08/27/2003, 2:56 PM

Maybe the space in the field name.
The order by is looking at two words, not a single field name.
Hamilton
Posted: 08/28/2003, 6:23 AM

Change...

SELECT * FROM [Laptop computers] ORDER BY Model Number

To....

SELECT * FROM [Laptop computers] ORDER BY [Model Number]

Since the field has a space in it - you need to have the []. The answer was before you... e.g, [Laptop computers]

That's all
David Hermansen
Posted: 08/28/2003, 7:22 AM

Code Charge Studio v2.1 generated the query. Can I get it to generate correct syntax by making a project setting? How would I modify the source code to generate the correct syntax?

Thanks,
RonB
Posted: 08/28/2003, 7:48 AM

In general it's a good idea not to use spaces in tabel names. Use underscore instead i.e:
Model_number and Laptop_computers

Saves a lot of trouble

Ron

   


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.