Ora-12899

indigo

Member²
I am converting to a new server but I am getting unexpected errors like:
ORA-12899: value too large for column .. (actual 30, maixmum 2)
on various fields when I try to insert records.

I am using a TOracleDataSet with:
select t.*,t.rowid from returns2

The program has been in use for many years and now I am getting an ORA-12899 for two fields. Both fields in this example are are char(1) but I modified them to varchar(40) for testing.

Test-1
-------
Insert;
UpdateFields; // NORMAL PROCEDURE FOR SETTING FIELDS
Post;

Records were written but value for two fields with ORA-12899 were not what was assigned.
Changed to:

Test-2
------
Insert;
UpdateFields; // DISABLED STATEMENTS ASSOCIATED WITH 2 FIELDS
FieldByName('PeriodType').AsString := 'A'; // TESTING
FieldByName('CreateType').AsString := 'X'; // TESTING
Post;

Records were written but value for two fields with ORA-12899 were same invalid values as before.
Changed to:

Test-3
------
Insert;
UpdateFields; // DISABLED STATEMENTS ASSOCIATED WITH 2 FIELDS
Post;

Records are not written at all and now I am getting ORA-12899 for a different field.

I can update existing records with the same code and everything works fine. I seem to only be getting the ORA-12899 when inserting new records. There were no errors when converting from our Oracle 9 database to the Oracle 10.

The problem was first detected when updating a different table with a field defined as varchar2(2). In this case the first fields where char(1). The field listed after test-3 is varchar(2).

Old server Windows 2003 Server 32 bit.
New server Windows 2008 Server 64 bit.
Old oracle version 9.2.0.5.0
New Oracle version 10.2.0.4.0
Direct Oracle Access 407

Please advise. If I need to download a newer version of DOA. Please send instructions.

Thanks, Sidney
 
Back
Top