怎么解决ORA-01008:并非所有变量都已绑定
展开全部
参数位的设定值不对。
sSQL = "insert into psymmetrical"
+ "(puid,frockpuid,frockid,frockname,symmetricalid,symmetricalfrockid,symmetricalfrockname," +
"symmetricaldate,temp1,temp2,temp3,temp4,temp5,createUser,createUserID)"
+ " values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
stmt = conn.prepareStatement(sSQL);
stmt.setString(1,SyObject.puid);
stmt.setString(1,SyObject.frockpuid); // 这里参数位
stmt.setString(1,SyObject.frockId); //还有这里参数位
stmt.setString(4,SyObject.frockName);
stmt.setString(5,SyObject.symmetricalId);
stmt.setString(6,SyObject.symmetricalFrockId);
stmt.setString(7,SyObject.symmetricalFrockName);
stmt.setString(8,SyObject.symmetricalDate);
stmt.setString(9,SyObject.temp1);
stmt.setString(10,SyObject.temp2);
stmt.setString(11,SyObject.temp3);
stmt.setString(12,SyObject.temp4);
stmt.setString(13,SyObject.temp5);
stmt.setString(14,SyObject.createUser);
stmt.setString(15,SyObject.createUserID);
stmt.executeQuery();
sSQL = "insert into psymmetrical"
+ "(puid,frockpuid,frockid,frockname,symmetricalid,symmetricalfrockid,symmetricalfrockname," +
"symmetricaldate,temp1,temp2,temp3,temp4,temp5,createUser,createUserID)"
+ " values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
stmt = conn.prepareStatement(sSQL);
stmt.setString(1,SyObject.puid);
stmt.setString(1,SyObject.frockpuid); // 这里参数位
stmt.setString(1,SyObject.frockId); //还有这里参数位
stmt.setString(4,SyObject.frockName);
stmt.setString(5,SyObject.symmetricalId);
stmt.setString(6,SyObject.symmetricalFrockId);
stmt.setString(7,SyObject.symmetricalFrockName);
stmt.setString(8,SyObject.symmetricalDate);
stmt.setString(9,SyObject.temp1);
stmt.setString(10,SyObject.temp2);
stmt.setString(11,SyObject.temp3);
stmt.setString(12,SyObject.temp4);
stmt.setString(13,SyObject.temp5);
stmt.setString(14,SyObject.createUser);
stmt.setString(15,SyObject.createUserID);
stmt.executeQuery();
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
看看参数个数,是不是少了逗号啥的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询