Posted By: MVDivotfixer Oracle 9i, Problems with TIMESTAMP - 07/08/03 10:18 PM
A customer asked me to upgrade a legacy applciation from Oracle 7.x support using the BDE to Oracle 9i support using DOA (latest version). In their updated schema, they have a TIMESTAMP field in all tables.

My challenge is that I have an updatable dataset (yes, I include ROWID). Table opens and displays, but when I attempt to edit the record I get a nasty Oracle Error - "ORA-01406: fetched column was truncated".

I creates a test table that does not include the the TIMESTAMP field and my edits work.

In the problem table I do not inlcude the TIMESTAMP field in the SQL string, but I get the problem anyway (not when I OPEN the dataset, but when I switch to EDIT state).

Any help appreciated...
Posted By: MVDivotfixer Re: Oracle 9i, Problems with TIMESTAMP - 07/09/03 04:05 AM
Details Update...

Tested in Oracle 9.1.0.2 and 9.2.0.1. Same behavior.

Tried using TO_CHAR(x) on my TIMESTAMP field with no success. Note that I am not updating this particular field (indeed would rather leave it out of my query entirely) but its mear presence in the table at all seems to generate this error.

I validated that if my TIMESTAMP field was empty (NULL) for a given row, I was able to enter EDIT MODE on the TOracleDataset. Likewise, adding a new row also works.

Entering EDIT MODE on a row with a non-NULL value in the TIMESTAMP field generated the ORA-1406 error.

Based on infomation I found in another post, I set my UseOCI7 to TRUE. This has eliminated my problem (yea!). This particular application has no Oracle 8i/9i (OCI8 or greater) requirements.

Going forward however, my customer will likely expand in to OCI8+ features. Does Allround have a stance on support of Oracle 9i relative to this issue? Is it a DOA defect? An Oracle defect? Are workarounds known?
Posted By: Marco Kalter Re: Oracle 9i, Problems with TIMESTAMP - 07/09/03 10:29 PM
Can you let me know your exact Direct Oracle Access version?

If you are using a multi-byte character set database, then it might help if you set TOracleSession.BytesPerCharacter to bcAutoDetect.

The upcoming 4.0 release supports Timestamps as a TDateTimeField in a dataset, so this conversion error can no longer occur in this situation.

------------------
Marco Kalter
Allround Automations
Posted By: MVDivotfixer Re: Oracle 9i, Problems with TIMESTAMP - 07/09/03 11:21 PM
Using 3.4.6, Dephi 5/6. Oracle databases in use in our environment: Oracle 7.3.x, which they are migrating to Oracle 9.1.0.2, Oracle 8.1.6 and 8.0.4 (for various test platform reasons).

Good news about 4.0. I look forward to it.
Posted By: Marco Kalter Re: Oracle 9i, Problems with TIMESTAMP - 07/10/03 10:00 PM
Did you check the BytesPerCharacter property?

------------------
Marco Kalter
Allround Automations
Posted By: MVDivotfixer Re: Oracle 9i, Problems with TIMESTAMP - 07/10/03 11:04 PM
Yes. I am not using multibyte however and altering BytesPerCharager from ONE to AUTOMATIC had no effect on my problem.

Only switching to OCI7 mode helped...

Sign me up for the beta on DOA4! (GRIN)
Posted By: Marco Kalter Re: Oracle 9i, Problems with TIMESTAMP - 07/11/03 07:01 PM
All registered users will be able to participate in the 4.0 beta.

------------------
Marco Kalter
Allround Automations
© Allround Automations forums