1

I am using ODAC library version 8.6.12 to connect to oracle with Delphi 6, I have a nvarchar(32) column as you can see it has a maximum of 32 characters and lets say that I always use 32 character values, e.g. "123456789-123456789-123456789-12"

The issue appears some times on customers PC that the result will be truncated to 16 characters, so the next code will show me a message with 16 characters "123456789-123456":

var MyID: string;
begin 
  MyID:= OraQuery.Field[0].AsString;//value must be "123456789-123456789-123456789-12"
  // -->> MyID = "123456789-123456"  only 16 characters 

Why I am having this issue? Does that depends on the Oracle version?

This is strange because the code used to work on the old ODAC, only on new ODAC 8.6.12 on some computers it doesn't work -on my computer it works fine-!

ZORRO_BLANCO
  • 849
  • 13
  • 25
  • Is the original string really just `123456789-123456789-123456789-12` or is that just your example? – Peter Jun 13 '13 at 12:02
  • No it is just my example, but the values on the table are all more that 16 characters values : This is a real example 40E43B6B81B8D6BD-58B6AF44 – ZORRO_BLANCO Jun 13 '13 at 12:28
  • Look at the oracle paramters that are contained in registry. nVarchar is probably a double byte type. Hence if there is a specific character that cannot be represented in one byte the string may be converted to double-byte by either Odac or the Oracle client. – Ali Avcı Jun 13 '13 at 12:28
  • Ali I already thought about something like that but didn't this kind of issues fixed in the ODAC? and what kind of characters that might do this issue? and would you please tell me where are these oracle parameters? – ZORRO_BLANCO Jun 13 '13 at 12:31
  • 2
    Not sure if it is your case, but in ODAC 9.0 a bug has been corrected regarding `nvarchar` in `UTF-8` databases on `Oracle 10` or prior versions. Check this [link](http://forums.devart.com/viewtopic.php?f=5&t=26989) – Guillem Vicens Jun 13 '13 at 12:43

1 Answers1

0

We have already fixed the problem, the fix will be included to the next version of ODAC, that will be released in the beginning of the next month.

Devart
  • 119,203
  • 23
  • 166
  • 186