Arithmetic Exception

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
barnie00
Posts: 11
Joined: Mon 24 Sep 2007 20:37

Arithmetic Exception

Post by barnie00 » Sun 06 Apr 2008 22:37

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]

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Mon 07 Apr 2008 12:45

Probably, your filter string has Windows-1252 character set. So you should set Charset option of TIBCConnection component to WIN1252.

ibdac2pro
Posts: 17
Joined: Mon 15 Oct 2007 14:26
Location: UK

Stilll not solved

Post by ibdac2pro » Wed 30 Jul 2008 15:02

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 31 Jul 2008 07:58

You don't need to change the DB character set. You should set the Charset option of TIBCConnection to WIN1252 or other appropriate value.

Post Reply