Package de.mhus.lib.sql

Examples of de.mhus.lib.sql.DbConnection.commit()


     
      // create database
      DbStatement sthc = con.getStatement("create");
      try {
        sthc.executeUpdate(null);
          con.commit();
      } catch (Exception e) {e.printStackTrace();}
     
      DbStatement sth = con.getStatement("select");
      try {
        DbResult res = sth.executeQuery(null);
View Full Code Here


        } else {
          throw e2;
        }
      }
     
      con.commit();

    }
   
    public void testAttributes() throws IOException, Exception {
      DbPool pool = createPool().getPool("test");
View Full Code Here

    public void testAttributes() throws IOException, Exception {
      DbPool pool = createPool().getPool("test");
      DbConnection con = pool.getConnection();
      try {
        con.getStatement("cleanup").execute(null);
          con.commit();
      } catch (ClassNotFoundException e1) {
        System.out.println("testAttributes: sql driver not found - skip test");
        return;
      } catch (SQLException e2) {
        if (e2.getMessage().startsWith("Communications link failure")) {
View Full Code Here

      res1.close();
     
      int res3 = con.getStatement("cleanup").executeUpdate(null);
      assertEquals(1, res3);
     
      con.commit();

    }
   
    @SuppressWarnings("deprecation")
  public void testAttributes2() throws IOException, Exception {
View Full Code Here

  public void testAttributes2() throws IOException, Exception {
      DbPool pool = createPool().getPool("test");
      DbConnection con = pool.getConnection();
      try {
        con.getStatement("cleanup2").execute(null);
          con.commit();
      } catch (ClassNotFoundException e1) {
        System.out.println("testAttributes: sql driver not found - skip test");
        return;
      } catch (SQLException e2) {
        if (e2.getMessage().startsWith("Communications link failure")) {
View Full Code Here

     
      // create database
      DbStatement sthc = con.getStatement("create2");
      try {
        sthc.executeUpdate(null);
          con.commit();
      } catch (Exception e) {e.printStackTrace();}

      int rows = 0;
     
      HashMap<String, Object> attr = new HashMap<String, Object>();
View Full Code Here

      rows++;
     
      int res3 = con.getStatement("cleanup2").executeUpdate(null);
      assertEquals(rows, res3);
     
      con.commit();

    }
   
    public void testStructure() throws Exception {
     
View Full Code Here

      DbPool pool = createPool().getPool("test");
      DbConnection con = pool.getConnection();
     
      try {
        con.getStatement("cleanup").execute(null);
          con.commit();
      } catch (ClassNotFoundException e1) {
        System.out.println("testStructure: sql driver not found - skip test");
        return;
      } catch (SQLException e2) {
        if (e2.getMessage().startsWith("Communications link failure")) {
View Full Code Here

      System.out.println("--------------------------------------------------");
      dialect.createStructure(cstr, con, null);
      System.out.println("--------------------------------------------------");
      dialect.createStructure(cstr, con, null);
     
      con.commit();
      con.close();
    }
   
    // test rollback
    // test housekeeper
View Full Code Here

    try {
      Object out = c.getObject(con,keys);
     
      if (myCon != null) {
        try {
          myCon.commit();
        } catch (Throwable t) {
          throw new MException(t);
        }
        myCon.close();
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.