We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to javadoc, There are no more results when the following is true: ((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
The following code will throw a Null Pointer Exception : boolean isRS= stmt.execute(sql); int updateCount = -1; while (isRS || (updateCount = stmt.getUpdateCount()) > -1) { if (isRS) { ResultSet rs = null; try { rs = stmt.getResultSet(); // Process resultset } finally { if (rs != null) { rs.close(); rs = null; } } } else { // an update count System.out.println("Result is " + stmt.getUpdateCount()); } isRS = stmt.getMoreResults(); }
Error message is : java.lang.NullPointerException at org.drizzle.jdbc.DrizzleStatement.getUpdateCount(DrizzleStatement.java:740)
The text was updated successfully, but these errors were encountered:
Fixes issue krummas#30. No more NPE.
c10ee8c
Merge pull request #31 from StephG38/master
fb1ef83
Fixes issue #30. No more NPE.
No branches or pull requests
According to javadoc,
There are no more results when the following is true:
((stmt.getMoreResults() == false) && (stmt.getUpdateCount() == -1))
The following code will throw a Null Pointer Exception :
boolean isRS= stmt.execute(sql);
int updateCount = -1;
while (isRS || (updateCount = stmt.getUpdateCount()) > -1)
{
if (isRS)
{
ResultSet rs = null;
try
{
rs = stmt.getResultSet();
// Process resultset
}
finally
{
if (rs != null)
{
rs.close();
rs = null;
}
}
}
else
{
// an update count
System.out.println("Result is " + stmt.getUpdateCount());
}
isRS = stmt.getMoreResults();
}
Error message is :
java.lang.NullPointerException
at org.drizzle.jdbc.DrizzleStatement.getUpdateCount(DrizzleStatement.java:740)
The text was updated successfully, but these errors were encountered: