我每隔30秒调用一次mysql Prepared语句就会出现这个错误,这是被调用的代码:
public static int getUserConnectedatId(Connection conn, int i) throws SQLException {
pstmt = conn.prepareStatement("SELECT UserId from connection where ConnectionId ='" + i + "'");
ResultSet rs = pstmt.executeQuery();
int id = -1;
if (rs.next()) {
id = rs.getInt(1);
}
pstmt = null;
rs = null;
return id;
}
Run Code Online (Sandbox Code Playgroud)
不确定问题是什么:s
| 归档时间: |
|
| 查看次数: |
2508 次 |
| 最近记录: |