H
H Branyan
ORA-01461 can bind a LONG value only for insert into a LONG column
Problem was originally discovered by simply putting in large amounts of text
into a textbox that would be inserted into a varchar2 field in the database.
The varchar2 type does not allow values greater than 4000 bytes to be
inserted. So, upon exceeding 4000 characters, this error was thrown.
However, entering 4000 characters, saving, then backspacing over 5
characters would also cause the error, despite that only 3995 character were
going into the update statement.
A variety of different numbers of characters were tried, with the same
problem happening even with just 2000 (1995 after backspacing) characters in
the box upon submits. Many things were attempted to see what might correct
the problem: cutting the box off at 4000 character did not correct it
because less characters could still potentially cause it. The encoding
schemes between the database and web browser were checked to ensure they
were the same single byte scheme. Matching these up did not correct the
problem. Trying to parse through the string before it was put in the update
statement and remove any non alphanumeric characters did not work.
Through all this we are led to believe that there is some type of issue in
ODP.NET, which handles the connectivity between the web and DB. Possibly
that it is somehow duplicating the data on the update, which causes anything
greater than 2000 characters to exceed the limit.
Has anyone come across this problem? How did you resolve it? (Occurs with
both .NET v1.0 and 1.1, and ODP.NET v9.2.0.2 and 9.2.0.4)
Problem was originally discovered by simply putting in large amounts of text
into a textbox that would be inserted into a varchar2 field in the database.
The varchar2 type does not allow values greater than 4000 bytes to be
inserted. So, upon exceeding 4000 characters, this error was thrown.
However, entering 4000 characters, saving, then backspacing over 5
characters would also cause the error, despite that only 3995 character were
going into the update statement.
A variety of different numbers of characters were tried, with the same
problem happening even with just 2000 (1995 after backspacing) characters in
the box upon submits. Many things were attempted to see what might correct
the problem: cutting the box off at 4000 character did not correct it
because less characters could still potentially cause it. The encoding
schemes between the database and web browser were checked to ensure they
were the same single byte scheme. Matching these up did not correct the
problem. Trying to parse through the string before it was put in the update
statement and remove any non alphanumeric characters did not work.
Through all this we are led to believe that there is some type of issue in
ODP.NET, which handles the connectivity between the web and DB. Possibly
that it is somehow duplicating the data on the update, which causes anything
greater than 2000 characters to exceed the limit.
Has anyone come across this problem? How did you resolve it? (Occurs with
both .NET v1.0 and 1.1, and ODP.NET v9.2.0.2 and 9.2.0.4)