Guest User

Untitled

a guest
Dec 6th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. try {
  2. String query = "SELECT vorname FROM person";
  3. String driver = "com.mysql.jdbc.Driver";
  4. String uri = "jdbc:mysql://localhost/fss";
  5. String user = "root";
  6. String pwd = "root";
  7. JDBCConnectionPool pool = new SimpleJDBCConnectionPool(driver, uri, user, pwd, 2, 5);
  8. SQLContainer container = new SQLContainer(new FreeformQuery(query, pool));
  9. mitarbeiterCB.setContainerDataSource(container);
  10. } catch (SQLException e) {
  11. e.printStackTrace();
  12. }
Add Comment
Please, Sign In to add comment