I have a very simple test user table (36 columns and 12 records) in my Oracle database. Column no 24 is a simple description defined as VARCHAR2(100 BYTE) nullable. For this table I’ve generated basic CRUD set using gii.
I’m put a string around 99-100 characters length, containing some national characters, using Oracle SQL Developer and simple UPDATE SQL query.
When I go to index containing CGridView, generated by gii, I’m getting exception “PDOStatement::fetchAll() [pdostatement.fetchall]: column 24 data was too large for buffer and was truncated to fit it”.
I did some research and found out that this error is specifically related with national characters. When I put string containing 100 "x" letters, the same way as above, I got not exception at all.
What surprised me the most, is though exception message suggest that it is PDO, not Yii problem, it turned out that I’m getting this exception only for CGridView. Using exactly the same dataset in CDetailView (view action out of generated gii CRUD set) all the data is perfectly retrieved and displayed.
Can anyone tell me, what could cause this situation and why it only relates to CGridView, not all Yii components? And does anyone have any idea for a workaround for this?
And finally, forgive me for a dumb question, but what the heck this error message exactly means? If “data was too large for buffer and was truncated to fit it” then, why the hell I’m getting exception instead of truncated dataset? What, in my opinion, this error message suggests.