Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Invalid character Value for cast specification

Author  Topic 

BadSectorGR
Starting Member

6 Posts

Posted - 2008-01-25 : 05:13:20
Hi All,

accessing through ODBC a frond end application which is running on MS SQL Server 2005, works just fine with a specific setup as concerned as the decimal/thousands separators ("," for thousands and "." for decimals). If i switch these settings alternatively ("." for thousands and "," for decimals), i get this error:
[Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification.

I tried to search forum and internet but no luck.
Thanks in advance

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-01-25 : 07:40:51
what is the code line that is failing...and with what typical data value?
you may need a COLLATE clause included.

Can you post sample code/sample data values/sample expected result?
Go to Top of Page

BadSectorGR
Starting Member

6 Posts

Posted - 2008-01-25 : 08:38:41
Unfrtunately it is not a code that i did. I am a consultant and i get this error at the front end of the application.
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2008-01-25 : 11:44:11
You're being hit by some sort of "regional setting" conflict, which given you're switching around the , & . formatting characters for ccy values isn't that odd. Can you talk to a Microsoft rep?

Even if it isn't your code, can you get a copy of same?
or can you experiment to generate the same sort of error yourself?
Go to Top of Page

BadSectorGR
Starting Member

6 Posts

Posted - 2008-01-25 : 12:41:00
I dont have access to the code. But this error is a general error that happens to several pc's and accepts saving only if i save with regional settings US. When i copied database to my system and tried it, it worked whatever the regional settings was. Veeery strange thing.
Go to Top of Page
   

- Advertisement -