init:
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Administrator\桌面\设备管理系统2.0\build\classes
compile-single:
run-single:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。参数不足,期待是 1。
这是什么意思啊?请大哥门帮忙解决
deps-jar:
Compiling 1 source file to C:\Documents and Settings\Administrator\桌面\设备管理系统2.0\build\classes
compile-single:
run-single:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] 参数不足,期待是 1。参数不足,期待是 1。
这是什么意思啊?请大哥门帮忙解决
解决方案 »
- 关于用java编写简单Web服务器的问题!!!求大神指教
- 为什么appletviewer不能正常启动? 在线等
- Applet的class怎么打包jar在网页上调用啊,打包后的jar文件可以换图标吗?
- JInternalFrame拖拽时,如何才能使JInternalFrame在设定的宽、高中拖拽,不超出这个范围!
- java怎么处理注册表啊,没有hkey对象吧?
- 请问如何给TextArea换字体!
- 简单问题请大家帮忙
- 大家帮我看一下!这个问题在哪里。
- 以前写的没错的,不知道今天怎么错了,请帮看看…
- * * * * * * * * * * 客观评价,VJ++有哪些不好,哪些好? * * * * * * * * * *
- 高分求教RMI调用时多线程问题?急急急!来者有分!
- 怎样取得JVM的标识性信息?
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO 将在此处添加您的处理代码:
String id = this.shebeihao.getText();
String name = this.shebeiming.getText();
String pattern = this.xinnghao.getText();
String kind = this.zhonglei.getText();
String leader =this.pizhuanrenyuan.getText();
String employee =this.jingshourenyuan.getText();
String part = this.suoshubumen.getText();
String indate = this.gouririqi.getText();
String diedate = this.baofeiriqi.getText();
String reason = this.baofeiyuanying.getText();
String getway = this.chulifangshi.getText();
String baofeiurl = "insert into baofei values ('"+id+"','"+name+"','"+pattern+"','"+kind+"','"+leader+"','"+employee+"','"+part+"','"+indate+"','"+diedate+"','"+reason+"','"+getway+"')";
String selecturl = "select * from kc where 设备名 = '"+name+"' and 所属部门 = '"+part+"'";
String updateurl = "update kc set 库存数目 = '"+number+"' where 设备名 = '"+name+"'and 所属部门 = '"+part+"'";
//String updateurl = "update kc set 库存数目 = '"+number+"' where 设备名 ="+"'"+name+"'"; if(id.equals("")||name.equals("")||pattern.equals("")||kind.equals("")||leader.equals("")||employee.equals("")||part.equals("")||indate.equals("")||diedate.equals("")||reason.equals("")||getway.equals("")) {
JOptionPane.showMessageDialog(this,"所有信息都必须填写","警告!!", JOptionPane.INFORMATION_MESSAGE);
} else {
try {
stmt.executeUpdate(baofeiurl);
rs = stmt.executeQuery(selecturl);
rs.next();
int sum1 = new Integer(rs.getStrin(3))..intValue(); int sum = sum1 -1;
number = Integer.valueOf(sum).toString();
int i = stmt.executeUpdate(updateurl);
if(i>0)
{
System.out.println("ok");
}
}
dispose();
} catch(Exception se) {
se.printStackTrace();
System.err.println("cule");
}
}我的问题是:insert语句能够执行 但是update语句不能执行 update语句不会错吧
就是设备管理系统中报废表中添加一条记录,库存表中减少一个设备,结果在更新语句上说有异常
希望大家帮帮忙