how to insert an empty string (zero-length) a non-nullable VarChar2 column
425313Jul 13 2004 — edited Nov 4 2006All--
Please help.
How can one insert an empty string (that is, a zero-length string) a non-nullable VarChar2 column?
That is, in C# for example, I want to insert this...
string myValue = "";
...into an Oracle column that is VarChar2 but not nullable.
When I try, Oracle complains that I cannot insert null into the column.
(FYI, I am using C# and ODP.NET and Oracle 9i.)
Right now, I am simply inserting a single space as a workaround, which seems rather crazy.
(Note that SQL Server 2000 will allow one to insert "" into a non-nullable column; so, I am wondering why Oracle does not.)
(Note that in this application, I cannot use nulls.)
What is the best way of handling this situation?
Please advise.
Thank you.
--Mark