0
I am trying to insert a base64_encode image with php in Oracle, but at the time of the Insert it returns me the following error:
ORA-01704: too long string literal.
The reason to return this error is because the string is too large, I was wondering if you have any method or function of Oracle that helps in this situation, for example some kind of conversion or similar.
First of all, do not recommend inserting this type of content in the bank. Per second, what type of field you are using to insert?
– Guilherme Lautert
I’m wearing a blob
– ROBERTO ALBINO JUNIOR
And what size do I set for him? blob
– Guilherme Lautert
I did not set the size at the time of creation, this could be the problem, you know how it would be to set the size of a blob field?
– ROBERTO ALBINO JUNIOR
"A BLOB without a specified length is defaulted to two gigabytes (2,147,483,647)." A BLOB with no specified length is set to standard 2GB (2,147,483,647).
– Guilherme Lautert
However, note that we are talking about size in bytes, in the documentation it says that these would be complementary information, you did not define it with some kind
VARCHAR
,TEXT
,CHAR
?– Guilherme Lautert
No no, I’ve tried as blob and clob.
– ROBERTO ALBINO JUNIOR