TWideStringFieldSize

giga

Member²
I use DOA 4.1.2.0 with oracle database where ALL32UTF16 charset is set. Session.BytesPerCharacter is set to bcAutoDetect.
There is varchar2(10) field at database, by TWideStringField.Size is 40. Why the size is fourth times larger?
 
Is it possible to set it to allow only 10 characters? It is same as difference between VARCHAR2(10 CHAR) and VARCHAR2(10 BYTE).

I want TDBEdit in application to allow only 10 characters (which can have up to 40 bytes)
 
TField.Size should contain the number of characters, not the number of bytes required to store them.
This is the reason for which edit controls allow you to type 40 chars instead of 10.

Marco, this is fixed by the code I sent you yesterday

 
Hi,

I realize this is an older topic. Carlo or Marco, could you share the solution to this.

It seems to me that dividing the value of FieldSize (in the CreateFieldDef proc in OracleData.pas) by the value of session.CurrentBytesPerCharacter might do the trick, but I do not want to break something else as a result.

Thank you!
 
Back
Top