Guest User

Untitled

a guest
Jul 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. /*
  2. // Load and register JDBC driver for Sybase IQ. This is not needed with jdbc4.0 compliant drivers.
  3. // Driver filename is "jconn4.jar". Get your hands on the latest one you can find. And put where the code can see it.
  4. // Class.forName("com.sybase.jdbc4.jdbc.SybDriver");
  5.  
  6. String ConnectionParams = String.format("jdbc:sybase:Tds:<server-name>:<port-number>/<database-name>");
  7. Connection con = DriverManager.getConnection(ConnectionParams, "username", "password");
  8.  
  9. Statement stmt = con.createStatement();
  10. ResultSet rs = stmt.executeQuery("select table_name from sys.systable;");
  11.  
  12. while (rs.next()) {
  13. String TableName = rs.getString(1);
  14. System.out.println(TableName);
  15. }
  16. stmt.close();
  17. con.close();
  18. */
Add Comment
Please, Sign In to add comment