Print Thread
Oracle 9i, Problems with TIMESTAMP
#5084 07/08/03 10:18 PM
Joined: Jul 2003
Posts: 5
M
Member
OP Offline
Member
M
Joined: Jul 2003
Posts: 5
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...

Re: Oracle 9i, Problems with TIMESTAMP
#5085 07/09/03 04:05 AM
Joined: Jul 2003
Posts: 5
M
Member
OP Offline
Member
M
Joined: Jul 2003
Posts: 5
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?

Re: Oracle 9i, Problems with TIMESTAMP
#5086 07/09/03 10:29 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
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


Marco Kalter
Allround Automations
Re: Oracle 9i, Problems with TIMESTAMP
#5087 07/09/03 11:21 PM
Joined: Jul 2003
Posts: 5
M
Member
OP Offline
Member
M
Joined: Jul 2003
Posts: 5
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.

Re: Oracle 9i, Problems with TIMESTAMP
#5088 07/10/03 10:00 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
Did you check the BytesPerCharacter property?

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations
Re: Oracle 9i, Problems with TIMESTAMP
#5089 07/10/03 11:04 PM
Joined: Jul 2003
Posts: 5
M
Member
OP Offline
Member
M
Joined: Jul 2003
Posts: 5
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)

Re: Oracle 9i, Problems with TIMESTAMP
#5090 07/11/03 07:01 PM
Joined: Aug 1999
Posts: 22,206
Member
Offline
Member
Joined: Aug 1999
Posts: 22,206
All registered users will be able to participate in the 4.0 beta.

------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.032s Queries: 13 (0.009s) Memory: 2.5203 MB (Peak: 3.0380 MB) Data Comp: Off Server Time: 2024-04-27 09:40:48 UTC
Valid HTML 5 and Valid CSS