Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I have a problem with a database query. Coldfusion Problem

Enthusiast ,
Dec 17, 2008 Dec 17, 2008
I have a problem with a database query. I have varchar column which when contains a '+' character I get an error in a coldfusion database query, however I do not get this error when I do the query in ms 2005 server.

faultCode:Server.Processing faultString:'Unable to invoke CFC - Error Executing Database Query.' faultDetail:'[Macromedia][SQLServer JDBC Driver]Value can not be converted to requested type.'
TOPICS
Database access
1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Dec 17, 2008 Dec 17, 2008
Can you post your code?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 18, 2008 Dec 18, 2008
Basically its a simple query
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 18, 2008 Dec 18, 2008
Basically its a simple query
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 18, 2008 Dec 18, 2008
sorry please ignore the above posts :(

The query is:

select dealID, forwardValue
from DEALS LEFT OUTER JOIN PARTIES
ON PARTIES.PartyID = DEALS.PartyID LEFT OUTER JOIN CURRENCYPAIRS
ON CURRENCYPAIRS.currencyPairID = DEALS.currencyPairID

the forwardValue column is the problem
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 18, 2008 Dec 18, 2008
do you really have a , (comma) after forwardValue in your query sql?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Dec 18, 2008 Dec 18, 2008
no sorry it was a typo in my pasting of code in this editor,please ignore
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Dec 23, 2008 Dec 23, 2008
LATEST
Does it help if you explicitly CAST it as a varchar?

select dealID, CAST(forwardValue AS varchar) AS fwdValue
from DEALS LEFT OUTER JOIN PARTIES
ON PARTIES.PartyID = DEALS.PartyID LEFT OUTER JOIN CURRENCYPAIRS
ON CURRENCYPAIRS.currencyPairID = DEALS.currencyPairID

Phil
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources