Given this field in an Oracle table:
ColumnName varchar(255 byte)
Given this string:
-- abcd abcdefghijkl mnokpqrstuvwxy abcd ab abcdefgh abc def abc
abcdef ab.* abcd
abcdefgh ij
abcd abcdefghijkl mn ab ab.cd = ef.abcdefghijk ab ab.cd = ab.cdabe
abcd abcdefghi.jklmnopqrstuvwxyzabc de ef ea.fd = ef.aezerfds
azere
fr.qsdfrtd = 1
fds ad.dfdsq
We insert this text into the specified column with a simple insert statement with the help of toad for oracle: that works fine.
However: if we insert this text with the help of nhibernate we will get an oracle error:
ORA-12899: value too large for column [**SNIP**] (actual: 262, maximum: 255)
This error is actually correct if you do a byte count of the given string, we will get a count of 262.
Why does nhibernate fail and why does toad for oracle succeed for the same action?
Has anyone any experience with this problem or something related to it?
Edit
Worth to mention here is that the string has been submitted in a html textarea. Possible problem here is that a return is counted as 1 character in the browser but it should be counted as more then 1 character since in .net it is represented by \r\n.
All this in a asp.net mvc scenario.