Preserve blanks in CHAR columns

Preserve blanks in CHAR columns

Postby Daniel Stucki » Mon 18 Aug 2008 11:32

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...
Daniel Stucki
 
Posts: 1
Joined: Mon 18 Aug 2008 10:57

Postby Shalex » Wed 20 Aug 2008 14:18

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.
Shalex
Devart Team
 
Posts: 7465
Joined: Thu 14 Aug 2008 12:44

Postby alicee » Wed 11 Aug 2010 15:04

Are there any plans to implement this feature?
Your recommendation to essentially handle it ourselves leaves a lot to be desired :/
alicee
 
Posts: 3
Joined: Wed 24 Mar 2010 12:07

Postby Shalex » Thu 12 Aug 2010 15:05

We will investigate this issue again and notify you about results as soon as possible.
Shalex
Devart Team
 
Posts: 7465
Joined: Thu 14 Aug 2008 12:44

Postby alicee » Tue 17 Aug 2010 13:14

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.
alicee
 
Posts: 3
Joined: Wed 24 Mar 2010 12:07

Postby Shalex » Mon 18 Oct 2010 09:37

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.
Shalex
Devart Team
 
Posts: 7465
Joined: Thu 14 Aug 2008 12:44

Postby Shalex » Thu 04 Nov 2010 14:33

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 .
Shalex
Devart Team
 
Posts: 7465
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle