java - Updating clob column in oracle with CLOB value -


i want update column clob type, method below;

public boolean formveriguncellesil(string sql) throws veritabaniexception {         try {             session session = getsessionfactory().getcurrentsession();             sqlquery query = session.createsqlquery(sql);             query.executeupdate();             return true;         } catch (runtimeexception e) {             throw new veritabaniexception(e, veriguncellemeexception, "fid_01_02_01");         }     } 

the sql string;

update k1form_listgrid3 set textarea4=oracle.sql.clob@77df8d, textt5='anaform',anatablo='1', olusturan_kullanici='184' id=1 

i "java.sql.sqlsyntaxerrorexception: ora-01729: database link name expected" error

how can fix sql. pls help.

oracle interpreting sql

set textarea4=oracle.sql.clob@77df8d 

as database link because of @ symbol, not matter anyway, because you're doing here trying set value of column tostring of clob, not intend.

your code sample not outline problem because method general utility execute passed sql, suggest 1 of 2 things:

  1. go griffeydog's suggestion , switch using preparedstatement bind clob using preparedstatement.setclob.
  2. if using oracle 11g+ jdbc driver, can set value of clob column using simple java string.

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -