Problem dbexpoda driver with string fields

Problem dbexpoda driver with string fields

Postby Henri » Wed 31 Dec 2008 12:16

Hi,

we have a win32 business application made with Delphi 7.0. Recently we have a few customers who migrated from Oracle 9 to Oracle 10 database. With the transition to Oracle 10 we use a different character set namely UTF8 which is 4 bytes per char. With oracle 9 we used a 1 byte character set.
We use oracle dbexpress driver dbexpoda v2.50.5.0 to connect to the database. The problem we are having now is that string fields (TStringField) have a size (both Size and DataSize property) 4x bigger than should be. If a field is declared VARCHAR2(10 CHAR) delphi thinks it can contain 40 characters instead of 10. The data aware components don't see the correct size of the string field anymore. When you have a name field of VARCHAR(10 CHAR) a DBGrid or DBEdit component thinks it can contain 40 chars instead of 10.
Situation with a 1 byte character set: a user enters can only enter 10 chars in a DBEdit box
Situation with a 4 byte character set: a user can enter more than 10 characters (up to 40 to be precise) and when he enters more than 10 characters and tries to save the data the oracle exception "ORA-12899: value too big for column" is raised.
I tried the latest dev art oracle dbexpress driver dbexpoda v4.40.0.13 from your website but the problem stays the same.
The problem is TStringField.Size property doesn't report the right amount of characters, which the data aware controls uses to limit a user input to the right amount of characters.

Can you help me with this problem

Kind regards
Henri
 
Posts: 1
Joined: Wed 31 Dec 2008 10:44

Postby Plash » Tue 06 Jan 2009 08:05

We have fixed this problem. The fix will be included in the next build of DbxOda.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09


Return to dbExpress driver for Oracle