我prepareStatement()
用来更新数据,有几列需要更新,我写了一个这样的程序:
public boolean editSocre(String field, String newValue)
{
...
updateSql = "update score set ? = ? where emp_id = ?";
pstmt3 = conn.prepareStatement(updateSql);
pstmt3.setString(1, field);
pstmt3.setString(2, newValue);
pstmt3.setString(3, userid);
int row = pstmt3.executeUpdate();
if (row <= 0)
{
return result;
}
...
}
java.sql.SQLException: ORA-01747: 无效的 user.table.column、table.column 或列规范
怎么修改,谢谢!!