日期:2014-05-17  浏览次数:21695 次

jdbc中预编译ORA-01003: 语句未进行语法分析
sql = "create or replace trigger trig " +
"after update on atmuser for each row " +
" begin " +
"insert into action_log values(?, 'update', ?, ?, ?);" +
"end; ";
pstat = conn.prepareStatement(sql);
pstat.setInt(1, id);
pstat.setInt(2, Integer.valueOf(jLabel1.getText()));
pstat.setInt(3, n_balance-Integer.valueOf(jLabel1.getText()));
//pstat.setDate(5, Date.valueOf(String.valueOf(System.currentTimeMillis())));
//pstat.setTimestamp(4, new Timestamp(System.currentTimeMillis()));
pstat.setDate(4, new Date(System.currentTimeMillis()));
System.out.println(new Date(System.currentTimeMillis()));
pstat.execute();
最好在pstat.execute();这里出错了,为什么啊?
在jdbc中如何使用触发器啊??这样不可以啊?

------解决方案--------------------
pstat.executeUpdate();换这个看看吧