1 | import java.net.URL; |
2 | import java.sql.*; |
3 | class simpleselect { |
4 | public static void main (String args[]) { |
5 | String url = "jdbc:odbc:my-dsn"; |
6 | String query = "SELECT * FROM emp"; |
7 | try { |
8 | // Load the jdbc-odbc bridge driver |
9 | Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); |
10 | // Attempt to connect to a driver. Each one |
11 | // of the registered drivers will be loaded until |
12 | // one is found that can process this URL |
13 | // SEE NEXT FOIL!! |