Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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:
    Code:
    $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.

  • #2
    Subscribed to upload to SC_Snippets when ready
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Originally posted by Giu View Post
      Subscribed to upload to SC_Snippets when ready
      Already in the faq of scriptcase.eu
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment

      Working...
      X