
求指导,com.microsoft.sqlserver.jdbc.SQLServerException: 已生成用于更新的结果集。
inti=0;conn=super.getConnection(conn);Stringsql="SELECT*FROMdb_BlodMay.dbo.tb_consume...
int i=0;
conn=super.getConnection(conn);
String sql="SELECT * FROM db_BlodMay.dbo.tb_consumer where account=? and password=?";
try {
ps=conn.prepareStatement(sql);
ps.setString(1, account);
ps.setString(2, password);
i=ps.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
super.CloseAll(null, ps, conn);
}
return i; 展开
conn=super.getConnection(conn);
String sql="SELECT * FROM db_BlodMay.dbo.tb_consumer where account=? and password=?";
try {
ps=conn.prepareStatement(sql);
ps.setString(1, account);
ps.setString(2, password);
i=ps.executeUpdate();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
super.CloseAll(null, ps, conn);
}
return i; 展开
1个回答
2015-07-11 · 知道合伙人软件行家
关注

展开全部
i=ps.executeUpdate(); 这个地方是更新用的,
你是查询,改成
resultSet = preparedStatement.executeQuery();
你是查询,改成
resultSet = preparedStatement.executeQuery();

2022-08-05 广告
苏州蓝晓生物科技有限公司。标准化核心产品:公司拥有完整的琼脂糖介质、葡聚糖介质、聚甲基丙烯酸酯介质生产线,年产分离介质50000L,产品质量稳定并达到国际领先水平。核心优势:公司核心技术人员拥有近二十年不同基质的基球开发和官能化的丰富技术经...
点击进入详情页
本回答由苏州蓝晓生物科技有限公司_提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询