执行此操作时:
PreparedStatement pst = conn.prepareStatement("Update registration set First_Name='"+fstNam+"',"
+"Last_Name='"+lstName+"',Email="+email+",Country='"+county+"',"
+"City='"+cty+"', Gender='"+gndr+"',U_N='"+User+"',Birth_Date='"+ddd+"', Language='"+lngug+"',"
+"Religion='"+rlign+"' where ID='"+ID+"' ");
pst.setString(1, fstNam);
pst.setString(2, lstName);
pst.setString(3, User);
pst.setString(4, email);
pst.setString(5, county);
pst.setString(6, cty);
pst.setString(7, gndr);
pst.setString(8, ddd );
pst.setString(9, lngug);
pst.setString(10, rlign);
int l = pst.executeUpdate()
我收到以下错误:
index out of range (1 > number of parameters, which is 0)
我的查询是否正确或有任何其他问题?