Package ejp

Examples of ejp.DatabaseManager.executeUpdate()


        DatabaseManager dbm = DatabaseManager.getDatabaseManager("contacts", 5,
                                                                 "org.hsqldb.jdbcDriver",
                                                                 "jdbc:hsqldb:mem:contacts",
                                                                 "sa", "");
       
        dbm.executeUpdate("CREATE MEMORY TABLE simple_storage (" +
                          "account varchar(40) NOT NULL," +
                          "container varchar(40) NOT NULL," +
                          "object varchar(40) NOT NULL," +
                          "data longvarbinary NOT NULL," +
                          "PRIMARY KEY (account, container, object))");
View Full Code Here


            //DatabaseManager dbm = DatabaseManager.getDatabaseManager("customers", 15, "jdbc/users");
         
            // HSQL in memory database
            DatabaseManager dbm = DatabaseManager.getDatabaseManager("users", 5, "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:users", "sa", "");
           
            dbm.executeUpdate("create memory table users(username varchar(30), password varchar(30), first_name varchar(40), last_name varchar(40), roles varchar(100))");
           
            dbm.saveObject(new User("admin", "b8fOPfDKETezXTCgqbtF", "Admin", null, "admin, create, delete"));
            dbm.saveObject(new User("jsmith", "njiaJzLtntWp6abHfRtU", "John", "Smith", "user"));
           
            config.getServletContext().setAttribute("databaseManager", dbm);
View Full Code Here

            //DatabaseManager dbm = DatabaseManager.getDatabaseManager("customers", 15, "jdbc/customers");
         
            // HSQL in memory database
            DatabaseManager dbm = DatabaseManager.getDatabaseManager("customers", 5, "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:customers", "sa", "");
           
            dbm.executeUpdate("CREATE MEMORY TABLE CUSTOMERS(FIRST_NAME VARCHAR(30), LAST_NAME VARCHAR(30), COMPANY_NAME VARCHAR(40), PHONE VARCHAR(15), EMAIL VARCHAR(255))");
            dbm.executeUpdate("INSERT INTO CUSTOMERS VALUES('John','Smith','EasierJava Inc.','561-1233','jsmith@EasierJava.com')");
           
            config.getServletContext().setAttribute("databaseManager", dbm);
          }
        catch (Exception e)
View Full Code Here

         
            // HSQL in memory database
            DatabaseManager dbm = DatabaseManager.getDatabaseManager("customers", 5, "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:customers", "sa", "");
           
            dbm.executeUpdate("CREATE MEMORY TABLE CUSTOMERS(FIRST_NAME VARCHAR(30), LAST_NAME VARCHAR(30), COMPANY_NAME VARCHAR(40), PHONE VARCHAR(15), EMAIL VARCHAR(255))");
            dbm.executeUpdate("INSERT INTO CUSTOMERS VALUES('John','Smith','EasierJava Inc.','561-1233','jsmith@EasierJava.com')");
           
            config.getServletContext().setAttribute("databaseManager", dbm);
          }
        catch (Exception e)
          {
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.