close

이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

linux/php

Recoverable fatal error: Object of class OCI-Lob could not be converted to string

mysop 2023. 4. 13. 10:31
728x90
반응형
Recoverable fatal error: Object of class OCI-Lob could not be converted to string in /home/mysop/index.php on line 5

오라클 데이터 파싱중 이런 에러가 나타나면

에러 문구 말대로 CLOB 데이터를 컨버터 해서 가져오면 된다

 

여러가지 방법이 있지만 function 을 통해

간단하게 변환해 보자

 

function read_clob($field) {
    return $field->read($field->size());
}

데이터를 위 function을 통과시켜 사용하면 된다

 

출처 : https://forum.codeigniter.com/thread-32811.html

 

[SOLVED] Retrieving CLOB data field from Oracle

[eluser]fszostak[/eluser] Hi All! After migration MySQL to Oracle, any fields with LONGTEXT datatype was change for CLOB datatype. 1) Error "Object of class OCI-Lob could not be converted to string" on field N.CONTENT (CLOB) Code: function getNews() {   

forum.codeigniter.com

 

728x90
반응형