varchar field truncated on 11g

martens

Member
Hello Forum!

In some circumstances, I lost few characters at the end of a varchar2 field, and I cannot figure out, why. It happen only on Oracle 11g (with O9 it works well). Could anybody help me?

Given a table:
with fields:
key number(38) not nullable,
text varchar2(128) nullable
with No triggers.

OracleDataSet component in delphi, with sql:
select rowid, text from
where key=1234

In the following code, all the "banyas" string literal has "a" with apostrophe. Chr 160. see: http://en.wikipedia.org/wiki/Hungarian_alphabet the 2nd letter :-) (I cannot write such a letter here)

Delphi code is:

OracleSession1.Connected:= True;
OracleDataSet1.Open;
OracleDataSet1.Edit;
OracleDataSet1.FieldByName('text').AsString:= 'banyas'; // *****
OracleDataSet1.Post;
OracleSession1.Commit;
OracleSession1.Connected:= False;

The stored result will be "bany".
But if I try to write "banyasas" the stored result will be "banyasas".

If I set OCI7=True, all works well, but I do not allowed to set it.

Environment:
Delphi 2009, DOA version: 4.1.2 (oraclient11.dll - version: 11.2.0)
database is (from v$version):
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

What could be the problem?
Tanks all replies!
 
Last edited:
More details:
-If I use UPDATE command with OracleQuery, it works well.
-From PL/SQL all works fine. (9.0.1.1613)
-I checked the network traffic with wireshark, and I found that the SQL command sent to server contains the truncated string already. (More precisely: 07:04:62:e1:6e:79:12:41:41:41:5a:53:76:41:41:56:41:41:41:54:65:47:41:41:41)
 
Last edited:
Back
Top