Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when Passing Sql statement to Crystal Report in VB6

Status
Not open for further replies.

IanAlex

Programmer
Apr 13, 2006
2
CA
Hi all! New here and already in a jam!
I am writing a small app that show already made report (CR) and i am sending it SQl statement to personalize the results. Now it is all working fine except when I enter a specific collum name in the Query. It's my primary key and is oddly named "SerialNumber+".

Now it's this + that's giving me a headache. whenever I insert it in my Sql statement (in a order by clause) I get the follwing message(from Crystal Report): "ODBC error:Driver]Unexpected extra token: +".

Note that the report work fine with the same parameters in Crystal report 8.5

Is there any way to pass this so the odbc driver will recognize it?

Here's the full query: SELECT * FROM ConfigurationItem Where.....ORDER BY ItemFR, MakeEn, ModelEN, SerialNumber+
 
Nevermind I found it!
I just replaced the + with a _ And now it works!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top