首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

jdbc中预编译ORA-01003: 语句未进行语法分析解决办法

2012-04-25 
jdbc中预编译ORA-01003: 语句未进行语法分析sql create or replace trigger trig +after update on

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();换这个看看吧

热点排行
Bad Request.