ORA-01406: fetched column value was truncated

Helene

Member³
This oracle error has recently started appearing. The problem occurs when a dataset with ReadBuffer=25 retrieves 25 of more rows of data. If the number retrieved is 24 or less, everything is fine. Also if the ReadBuffer size is increased, everything is fine, with the same set of test data.

Now, if I set the ReadBuffer to 3, everything seems to be fine until I start scrolling the grid. Then at one point the same exception is thrown, but after that I can continue scrolling.

With a readbuffer of 25, nothing ever appears in the grid.

We have not experienced such problems before, and apparently they have started to appear after installing version 3.4.5. I cannot say this for certain, however - maybe we just happened to reach the critical number of test persons that have a name starting with 'G'...

Do you have any solution for this problem?
 
This is a strange problem. I doubt that anything has changed at this level between 3.4.x patch releases, but you never know.

Can you send me something to reproduce the problem? If not, can you try to find out if there is a specific record that leads to this error, and perhaps even a specific column value?

------------------
Marco Kalter
Allround Automations
 
I mailed you a test project the 24.august, which causes this error to occur. Please notify me if you have not received this mail.

With regards Helene

[This message has been edited by helene (edited 27 August 2001).]
 
Did you get my reply from the 27th?

------------------

Hello Helene,

If I import the test data, run the demo application, and press the 'Run Query' button, I get 26 records and no error. Should this have reproduced the problem? If so, could you let me know what session property settings affect the problem in your situation?

------------------
Marco Kalter
Allround Automations
 
Yes, I got your reply, and when I tested again I was unable to produce the error in the test application myself. I have tried to ask the DBA's if they changed something, but I just don't figure out what happened. However, using the original data module I can still produce this error, using the same SQL etc.

But, after making a small change to the SQL in this datamodule, the error disappeared. The original SQL selected a database date field, which was stored in a persistent field of type TStringField. (The StringFieldsOnly property of the dataset is true). The changed SQL now uses the To_Char function to convert this date value into a char. After this change the error disappeared.
 
This problem appeared in PL/SQL Developer also.
The Fix: Set OCI mode to 7. This seems to occur when you have OCI greater than version 8.0
 
Back
Top