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。
这是什么意思啊?请大哥门帮忙解决

解决方案 »

  1.   

    上面问题的补充:
    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语句不会错吧
    就是设备管理系统中报废表中添加一条记录,库存表中减少一个设备,结果在更新语句上说有异常 
    希望大家帮帮忙
      

  2.   

    你把他的SQL打印出来 然后在数据库里执行 试试看