CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 CCDLookUp Error....

Print topic Send  topic

Author Message
talamar
Posted: 12/20/2004, 4:30 PM

:-/ I keep getting this error when trying to use the CCDLookup Function.

Source: CCDLookUp function  
Command Text: SELECT PostHeight FROM Product Weights WHERE Product = SS-40 6  
Error description: Syntax error (missing operator) in query expression 'Product = SS-40 6'. (Microsoft JET Database Engine)<br>


My Access table structure is like this:
RecID pK AutoNumber
ProductID Number
Product Text
PostHeight Number
WeightPerFoot Number
DollarsPerTon Currency
EstValuation Currency

No matter what column I try to retrieve from this table, I get the same error (PostHeight, WeightPerFoot OR DollarsPerTon). Can anyone offer any advice?

peterr


Posts: 5971
Posted: 12/20/2004, 4:52 PM

You need to create valid SQL syntax.
Your database reports that this syntax is invalid, probably because quotes are missing around the product name: "SELECT PostHeight FROM Product Weights WHERE Product = SS-40 6".
If you experience other problems with SQL, you can copy your SQL statement directly into your database and possibly the database will show you more details about what's wrong.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
talamar
Posted: 12/20/2004, 5:04 PM

Peter:

That did it... Thanks. I was using the line
"Product = " & Projects.Product.Value
When it should have been:
"Product = " & """ & Projects.Product.Value & """

Thanks a million!

talamar

Quote peterr:
You need to create valid SQL syntax.
Your database reports that this syntax is invalid, probably because quotes are missing around the product name: "SELECT PostHeight FROM Product Weights WHERE Product = SS-40 6".
If you experience other problems with SQL, you can copy your SQL statement directly into your database and possibly the database will show you more details about what's wrong.
"Product = " & """ & Projects.Product.Value & """
"Product = " & Projects.Product.Value
nebde


Posts: 3
Posted: 12/21/2004, 1:18 AM

try to use this line
"Product = " & CCToSQL(Projects.Product.Value,"Text")
instead of "Product = " & Projects.Product.Value


8-)
_________________
Regards,
nebde
View profile  Send private message

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.

MS Access to Web

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

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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