Please help me out.
I have query (SQL Server7.0)
SELECT Count(tblUsers.status) AS num, username
FROM tblUsers
GROUP BY tblUsers.username,tblUsers.status
However, the ResultSet.getInt("num") gave me error:
javax.servlet.ServletException: [Microsoft][ODBC SQL Server
Driver]Invalid Descriptor Index
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid
Descriptor Index
I don't know what data type of 'num' should be, and how to fix this error.
Please help.
Thanks,
Leo.
.....
while (rs1.next())
{
out.println(rs1.getString("username")); //this is
ok...
out.println(String.valueOf(rs1.getInt("num")) //error here....
}
....
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html