| 451 | } // end of GetColumns |
| 452 | |
| 453 | public int Execute(String query) { |
| 454 | int n = 0; |
| 455 | |
| 456 | if (DEBUG) |
| 457 | System.out.println("Executing '" + query + "'"); |
| 458 | |
| 459 | try { |
| 460 | boolean b = stmt.execute(query); |
| 461 | |
| 462 | if (b == false) { |
| 463 | n = stmt.getUpdateCount(); |
| 464 | if (rs != null) rs.close(); |
| 465 | } // endif b |
| 466 | |
| 467 | if (DEBUG) |
| 468 | System.out.println("Query '" + query + "' executed: n = " + n); |
| 469 | |
| 470 | } catch (SQLException se) { |
| 471 | SetErrmsg(se); |
| 472 | n = -1; |
| 473 | } catch (Exception e) { |
| 474 | SetErrmsg(e); |
| 475 | n = -2; |
| 476 | } //end try/catch |
| 477 | |
| 478 | return n; |
| 479 | } // end of Execute |
| 480 | |
| 481 | public int GetResult() { |
| 482 | int ncol = 0; |