()
| 300 | } // end of ClosePrepStmt |
| 301 | |
| 302 | public int JdbcDisconnect() { |
| 303 | int rc = 0; |
| 304 | |
| 305 | // Cancel pending statement |
| 306 | if (stmt != null) |
| 307 | try { |
| 308 | if (DEBUG) |
| 309 | System.out.println("Cancelling statement"); |
| 310 | |
| 311 | stmt.cancel(); |
| 312 | } catch(SQLException se) { |
| 313 | SetErrmsg(se); |
| 314 | rc += 1; |
| 315 | } // nothing more we can do |
| 316 | |
| 317 | // Close the statement and the connection |
| 318 | if (rs != null) |
| 319 | try { |
| 320 | if (DEBUG) |
| 321 | System.out.println("Closing result set"); |
| 322 | |
| 323 | rs.close(); |
| 324 | } catch(SQLException se) { |
| 325 | SetErrmsg(se); |
| 326 | rc = 2; |
| 327 | } // nothing more we can do |
| 328 | |
| 329 | if (stmt != null) |
| 330 | try { |
| 331 | if (DEBUG) |
| 332 | System.out.println("Closing statement"); |
| 333 | |
| 334 | stmt.close(); |
| 335 | } catch(SQLException se) { |
| 336 | SetErrmsg(se); |
| 337 | rc += 4; |
| 338 | } // nothing more we can do |
| 339 | |
| 340 | ClosePrepStmt(); |
| 341 | |
| 342 | if (conn != null) |
| 343 | try { |
| 344 | if (DEBUG) |
| 345 | System.out.println("Closing connection"); |
| 346 | |
| 347 | conn.close(); |
| 348 | } catch (SQLException se) { |
| 349 | SetErrmsg(se); |
| 350 | rc += 8; |
| 351 | } //end try/catch |
| 352 | |
| 353 | if (DEBUG) |
| 354 | System.out.println("All closed"); |
| 355 | |
| 356 | return rc; |
| 357 | } // end of JdbcDisconnect |
| 358 | |
| 359 | public int GetMaxValue(int n) { |
no test coverage detected