Advertisement
Guest User

LOLOLOLLABD

a guest
Dec 14th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.21 KB | None | 0 0
  1.  String login="yv965015";
  2.         String pass="yv965015";
  3.         Connection connect = null;
  4.         try
  5.         {
  6.             Class.forName("oracle.jdbc.driver.OracleDriver");
  7.         }
  8.         catch (ClassNotFoundException ex)
  9.         {
  10.             Logger.getLogger(TestJDBC.class.getName()).log(Level.SEVERE, null, ex);
  11.         }
  12.         try
  13.         {
  14.             connect = DriverManager.getConnection("jdbc:oracle:thin:@butor:1521:ensb2016", login, pass);
  15.         }
  16.         catch (SQLException ex)
  17.         {
  18.             Logger.getLogger(TestJDBC.class.getName()).log(Level.SEVERE, null, ex);
  19.         }
  20.         DatabaseMetaData dbmd = null;
  21.         try
  22.         {
  23.             dbmd=connect.getMetaData();
  24.         }
  25.         catch (SQLException ex)
  26.         {
  27.             Logger.getLogger(TestJDBC.class.getName()).log(Level.SEVERE, null, ex);
  28.         }
  29.         try
  30.         {
  31.             dbmd.getDefaultTransactionIsolation();
  32.         }
  33.         catch (SQLException ex)
  34.         {
  35.             Logger.getLogger(TestJDBC.class.getName()).log(Level.SEVERE, null, ex);
  36.         }
  37.         /*if(connect!=null)
  38.             connect.setTransationIsolation(Connection.TRANSACTION_SERIALIZABLE);
  39.        else;*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement