问题:no current row in the result?
问题就出现在这段代码中,各位看有什么不对的地方吗?
ctx = new InitialContext();
if (ctx == null)
throw new Exception( "ctx==null ");
ds = (DataSource) ctx.lookup( "java:comp/env/jdbc/connectDB ");
if (ds == null)
throw new Exception( "ds==null ");
conn = ds.getConnection();
if (conn == null)
throw new Exception( "conn==null ");
stmt = conn.createStatement();
strStuCode = request.getParameter( "stucode ");
strSql = "select * from stuinformationT where stucode= "+strStuCode;
rs = stmt.executeQuery(strSql);
rs.next();
strStuCode = rs.getString( "stucode ");
strStuName = rs.getString( "stuname ");
strStuAge = rs.getString( "stuage ");
提问时间:
2007-7-17 10:33:11 回答次数:
(2) 提问人:
软界网友 我来回答