sql语法错误,和PreparedStatement 没关

解决方案 »

  1.   

    就是这个SQL语句,你看有错误吗?insert into fdc_channel (vcc,name,descr,no,useflag,host,com_mode,proto_type,com_type,devaddr,baud,parity,databit,stopbit,asyncflag,stop_limit,init_state,localar,remotear,remotear2,remotear3,remotear4) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
      

  2.   

    pst = conn.prepareStatement("insert into test values(?, ?, ?)");
                for (int i = 0; i < 500; i++) {
                    pst.setString(1, "id_" + i);
                    pst.setString(2, "name_" + i);
                    pst.setString(3, "address_" + i);
                    pst.execute();
                }
      

  3.   

    找到错误所在了,pStmt.executeUpdate(sql);    //出现Exception
    参数里不应该再有sql!!!!结帖!