How to do an update on oracle CLOB longer then 4000 characters using scriptcase

We had a problem where we wanted to do an update on a CLOB field by hand using an update statement.
Yet this is not possible using (example:) UPDATE mytable SET mycolumn=‘lotsa of data…’ WHERE MYKEY=123456
For this scriptcase has made a function called UpdateClob which can be used the following way:


$this->tekst='lotsa of data......';   //$this->tekst is the field name here
$rs = $this->Db->UpdateClob("mytable", "mycolumn", $this->tekst,  "MYKEY = 123456"); 

if ($rs === false) 
{ 
    $this->Erro->mensagem (__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_updt'], $this->Db->ErrorMsg()); 
    $this->NM_rollback_db(); 
    if ($this->NM_ajax_flag)
    {
        form_SCRIPTCASE_DEBUG_MESSAGES_pack_ajax_response();    //use your own function here
    }
    exit;  
} 

In order to find how it works in detail when you have a CLOB field just view the generated sources and find the UpdateClob function.
Likely a BLOB has something similar.
Be aware a CLOB gets translated from the database characterset a BLOB is never translated to another characterset.

Subscribed to upload to SC_Snippets when ready

Already in the faq of scriptcase.eu