使用JDBC的Statement删除数据报错
JAVA代码如下:
String projectID=request.getParameter("projectid");//得到项目的唯一ID号
Session dbSession=mySessionFactory.getSession();
Transaction tx = dbSession.beginTransaction();
Connection conn=dbSession.connection();//取得Session的JDBC连接
Statement stmtProject=conn.createStatement();
String tmpStr;
try
{
//使用JDBC删除plan_sun_project表中满足条件的记录
tmpStr="delete from PLAN_SUN_PROJECT where PROJECTID="+projectID;
stmtProject.executeUpdate(tmpStr);//在此处出错
tx.commit();
}
catch (Exception e)
{
tx.rollback();
System.out.println(e.getMessage());
return null;
}
提示的错误是:ORA-00933: SQL 命令未正确结束。请大家帮忙。谢谢