Page 1 of 1

Arithmetic Exception

Posted: Sun 06 Apr 2008 22:37
by barnie00
Hello!

I have a problem with special characters like 'ä', 'ü', 'ö' when I try to filter my data.
The following code is used very often in the program.

Code: Select all

sprintf(szSuchFilter, "BEZEICHNUNG like '%s%s%s'",
	  SqlWildcard.c_str(), Filter.c_str(), SqlWildcard.c_str());
Query->Active=false;
Query->DeleteWhere();
Query->AddWhere(szSuchFilter);
Query->Active=true;
With Filter='säure' (säure means acid in german)
I get the following Message:

"arithmetic exception, numeric overflow, or string truncation
Cannot transliteral character between character sets"

Charset is set to ISO8859_1 in the program and in the database.
[/code][/quote]

Posted: Mon 07 Apr 2008 12:45
by Plash
Probably, your filter string has Windows-1252 character set. So you should set Charset option of TIBCConnection component to WIN1252.

Stilll not solved

Posted: Wed 30 Jul 2008 15:02
by ibdac2pro
The Problem is still not solved.
In the DB the charset must be "ISO8859_1".
Is it possible to solve the problem without changing the DB Charset.
It doesn't help to use different charsets.

With Tools like FlameRobin or EMS SQL Manager it works fine with the current settings.

Posted: Thu 31 Jul 2008 07:58
by Plash
You don't need to change the DB character set. You should set the Charset option of TIBCConnection to WIN1252 or other appropriate value.