java - How to disable other operations without querying with jdbcTemplate - query method -


i found while using query method jdbctemplate sql statement "delete table_name..." or "alter table table_name...", etc.
, sql or command executed though oracle error code exception thrown out. want query db not change it, how disable/restrict other invalid operations without querying?

the sample code shown follows:

  ...   jdbctemplate targetjt = new jdbctemplate();      targetjt.setdatasource(tx.getdatasource());    string sql = "alter table hr add ch_name varchar2(16)";     targetjt.queryforlist(sql);   ... 

then program receive ora-01003: no statement parsed, column ch_name created.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -