I found this bug (working with ORACLE) and found a solution, but I’m not sure if mine is the best way, so I want to see your opinions
These days I had to develop a form with an text information around 4000 characters. I used first a VARCHAR(4000), but got an ORA-01461 error:
<h3 class="r">can bind a LONG value only for insert into a LONG column</h3> After extensive search, I realized the following:
VARCHAR only supports 4000characters long. It’s a good number of chars, but in multibytescollations (i.e., UTF8) , this limit decreases to 1333 chars (it uses 3 bytes tohandle it properly).
Above this limit, PDO treats the column as LONG, and requires thePDO::PARAM_LOB as param type (Instead of, the ORA-01461 error message israised)
Above this limit we can use the CLOB type (Character Large OBject).
[b]BUT, PDO doesn’t recognizes PDO::PARAM_LOB as a valid type for CLOBs!!! It is a bug apparently without solution!
Also, CLOBs are charged by Yii as resource streams, so it requires some special treatment.
Oracle and forum developers, do you have some opinion about how can we handle with this problem?