> I have a question about a database to servlet connection.
> Does anyone know how to check if a query returns a null value in the
> ResultSet.
> Thanks.
Hi,
> I have a question about a database to servlet connection.
> Does anyone know how to check if a query returns a null value in the
> ResultSet.
> Thanks.
>
ResultSet rs = executeQuery(Select);
boolean hasResults = rs.next();
if (!hasResults) {
...
}
else {
while (hasResults) {
...
hasResults = rs.next();
}
}
Hope this helps
Matthias
___________________________________________________________________________
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