aehimself wrote: ↑24.11.2020, 19:37As a summary, what we discussed until now:
- Oracle 11.2 and 12.1 both reports correct .Size for string fields
- MySQL and FreeTDS (MSSQL) still reports x4 .Size for string fields
- On Oracle, the UTF-16 ClientCodePage setting is probably corrupting memory, producing really strange results in a standard DBGrid, and still throws the “field value was truncated” error with many rows and string fields.
So I refreshed my Git repository, currently on
74e7e12236f582d29795b384ac9db971f133b862
egonhugeist on 11/23/2020, 6:13:20 PM
Delphi package ProductVersion upgrade to 8.0 (string replace with vim)
I can confirm that with this update level:
- Oracle 11.2 and 12.1 both reports correct .Size for String fields.
- MySQL and FreeTDS (MSSQL) still reports x4 .Size for String fields.
- Oracle 11.2 and 12.1 both messes up String field values when ClientCodePage is set to UTF-16
AND CACHED LOBS ARE ENABLED. Without cached LOBs, all values are displayed correctly. Truncation error is also present, with or without cached LOBs:
Code: Select all
An error happened at 0x00000000010CA74E while opening dataset:
EZSQLException was raised with the message SQL Error: ORA-01406: fetched column value was truncated
Code: 1406 Message: FETCH ROW
Connection information: Oracle 12.1.0, client version: 19.8.0, database access component version: 8.0.0-74e7e1223
Connected to database ***, schema *** at host *** as user ***
Loaded library: C:\WINDOWS\oci.dll
Transaction isolation level: None
controls_cp: CP_UTF16
codepage: UTF16
DateWriteFormat: YYYY.MM.DD
OCIMultiThreaded: True
CachedLob: True
RawStringEncoding: DB_CP
Code: Select all
An error happened at 0x00000000010CA74E while opening dataset:
EZSQLException was raised with the message SQL Error: ORA-01406: fetched column value was truncated
Code: 1406 Message: FETCH ROW
Connection information: Oracle 11.2.0, client version: 19.8.0, database access component version: 8.0.0-74e7e1223
Connected to database ***, schema *** at host *** as user ***
Loaded library: C:\WINDOWS\oci.dll
Transaction isolation level: None
controls_cp: CP_UTF16
codepage: UTF16
OCIMultiThreaded: True
RawStringEncoding: DB_CP