Package be.xtnd.commons.db

Examples of be.xtnd.commons.db.Database


            CommonsI18n.tr("Are you sure you want to exit the application?"),
            CommonsI18n.tr("Quit confirmation"),
            JOptionPane.YES_NO_OPTION,
            JOptionPane.QUESTION_MESSAGE);
          if (response == JOptionPane.YES_OPTION) {
            try{new Database().disconnect();}catch(Exception ex){/*just in case...*/}
            System.exit(0);
          }
      }
        });
    Container contentPane = this.getContentPane();
View Full Code Here


      databases = new Databases();
    }
  }
 
  private boolean connect(){
    db = new Database(this.provider_name, this.sql_server, this.user_value,
        this.passe_value, this.sql_provider);

    /** FIXME: errors are already handled into {@link MysqlErrors}, we should relay on that to avoid duplicated code */
    if(db.getErrCode()==1045){ //access denied
      Object[] args = {db.getSql_server(), db.getSql_user(), (db.hasSql_password())?CommonsI18n.tr("yes"):CommonsI18n.tr("no")};
View Full Code Here

                JOptionPane.ERROR_MESSAGE);     
            logger.debug("No database selected for export");
          }else{
            db_name = paths[0].getLastPathComponent().toString();
           
            Mysql2Sql msql = new Mysql2Sql(new Database(
                provider_name,
                buildSqlServer(),
                user_value,
                passe_value,
                sql_provider),
View Full Code Here

    try {
      JasperDesign jasperDesign;
      jasperDesign = (this.design==null)?JRXmlLoader.load(modelUrl):this.design;
      JasperReport jasperReport = new JRJdtCompiler().compileReport(jasperDesign);
         
      Database database = (MainGui.db != null)?MainGui.db:new Database(true);     
      Connection connection = database.getConnection();
               
          JasperPrint jasperPrint = null;
          if(this.rs!=null){
            JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
            jasperPrint = JasperFillManager.fillReport(jasperReport,
View Full Code Here

     * database connection, so we limit number of database connections. Use
     * {@link #ResultSetTableModelFactory(Database)} instead.
     */
    @Deprecated
    public ResultSetTableModelFactory(){
      database = new Database();
      database.setConnectionParameters(
          ResultSet.TYPE_SCROLL_INSENSITIVE,
        ResultSet.CONCUR_READ_ONLY);
      oldMode = true;
    }
View Full Code Here

TOP

Related Classes of be.xtnd.commons.db.Database

Copyright © 2018 www.massapicom. 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.