Page 1 of 1

Preserve blanks in CHAR columns

Posted: Mon 18 Aug 2008 11:32
by Daniel Stucki
In our tables, we have columns defined as CHAR(1). These columns can contain alpha numeric values, blanks included.
With OraDirect 4.70.38.0 all the blanks are trimmed. That is, after executing a SELECT with one of these CHAR-columns which contain only one blank, we'll get back an empty string and not a string with one blank.

In an older post (back in 2004), you mentioned "... a special option to OracleCommand...". Unfortunately, I'm not able to find this magic thing...

Posted: Wed 20 Aug 2008 14:18
by Shalex
This feature is not available in the current versions of OraDirect .NET.
It is recommended to process such returning results on your side by the code.

Posted: Wed 11 Aug 2010 15:04
by alicee
Are there any plans to implement this feature?
Your recommendation to essentially handle it ourselves leaves a lot to be desired :/

Posted: Thu 12 Aug 2010 15:05
by Shalex
We will investigate this issue again and notify you about results as soon as possible.

Posted: Tue 17 Aug 2010 13:14
by alicee
Thanks for looking into this.

Other providers such as DataDirect and Oracle's ODP.net handle this situation correctly, so it would be awesome if Devart could too.

Posted: Mon 18 Oct 2010 09:37
by Shalex
We have added the Trim Fixed Char connection string parameter (and the OracleConnection.TrimFixedChar property). This option specifies whether blank value from CHAR(size) is trimmed by dotConnect for Oracle or not. It affects all command objects of this connection. Behaviour of data reader depends on the Trim Fixed Char value at the moment of opening data reader. The default value is true.

I will post here when the corresponding build is available for download.

Posted: Thu 04 Nov 2010 14:33
by Shalex
New build of dotConnect for Oracle 5.70.190 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=19420 .