After facing the problem:
ORA-32108: max column or parameter size not specified
I researched a little and I found these two questions: Why does Oracle 9i treat an empty string as NULL? and Oracle not distinguishing between nulls and empty strings? .
These questions explain the error I get. But this led me to the next question - how can I return empty string as a field value in a ResultSet in Oracle?
What I have so far is:
- create the statement
- register output parameter as
oracle::occi::OCCICURSOR
execute
the statement- the I call
GetCursor
to use the returned resultset
The execute
fails, because of the error, described above.
So, how can I return such field in the resultset, which has value an empty string (''
)?
In other words, I don't know how to apply the action, specified HERE - is it something server-side? Or I should add something in my code? Or in the stored procedure, that returns this resultset?
I use OCCI (Oracle C++ Call Interface). My current workaround is to return a string, containing a single space (' '
), but I don't like it.