Hi, I have a simple perl script as a test of getting data from a CLOB field. My database is Oracle 8.1.7, and it has a charset UTF8. The client is also on UTF8. The trace shows that everything up to the 'fetch' step goes correctly. But during OCILobRead only part of the data is received (161 bites (or chars?) instead of 485), and the script terminates with an error.
If I change client's NLS_LANG to AMERICAN_AMERICA.WE8MSWIN1252, I get the TEXT data without problems. Does anybody know how to get CLOB data for UTF8 client? Thanks. Irina. Below are the details: The script executes a query 'select text from text where rownum < 2' . The TEXT field is CLOB(4000). The error that I get while running the test script is: ------------------------------------------------ DBD::Oracle::st fetchrow_arrayref failed: (DBD NEED_DATA: OCILobRead) at test_clob.pl line 10. DBI::db=HASH(0x1b88c10)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at test_clob.pl line 14. DBD::Oracle::db disconnect failed: ORA-03127: no new operations allowed until the active operation ends (DBD ERROR: OCISessionEnd) at test_clob.pl line 14. ------------------------------------------------- A part of the trace output with the error: OCIStmtFetch(0270E434,026F776C,1,2,0)=SUCCESS dbih_setup_fbav for 1 fields => 0x1ce3b78 dbd_st_fetch 1 fields SUCCESS OCILobGetLength(026F74D4,026F776C,026F68B4,0140FAC8)=SUCCESS OCILobRead(026F74D4,026F776C,026F68B4,0140FACC,1,01CE0B04,485,00000000,00000 000,0,1)=NEED_DATA OCILobRead field 2 NEED_DATA: LOBlen 485, LongReadLen 4000, BufLen 485, Got 161 OCIErrorGet(026F776C,1,"<NULL>",0140F964,"Τυ@a",1024,2)=NO_DATA 0 (rc=0): undef !! ERROR: 99 ' (DBD NEED_DATA: OCILobRead)' <- fetchrow_arrayref= undef row1 at test_clob.pl line 11 -> disconnect for DBD::Oracle::db (DBI::db=HASH(0x1ce3a88)~0x1ce39c8) OCISessionEnd(026F74D4,026F776C,0270EF3C,0)=ERROR OCIErrorGet(026F776C,1,"<NULL>",0140FBAC,"ORA-03127: no new operations allowed until the active operation ends ",1024,2)=SUCCESS OCIErrorGet after OCISessionEnd (er1:ok): -1, 3127: ORA-03127: no new operations allowed until the active operation ends