Main Quick Start User Guide JavaDoc News Download Contact

BuzzSQL - Quick Start Guide for Java Developers
================================================

* Minimum Requirements:
  * Java 5 or higher
  * Apache Jakarta commons-logging
  * JDBC driver jar for your database 

* Add buzzsql-.jar to your classpath.

* In a J2SE stand-alone environment, add the following libraries to your
  classpath if they are not already present:

  * commons-logging-1.1.jar  
  * log4j-1.2.14.jar (If you choose to use log4j for logging)
  * shiftone-oocjndi.jar
  * shiftone-arbor.jar
  * c3p0-0.9.1.2.jar
  * (Your JDBC driver)

* In a J2EE application server environment, add the following libraries to 
  your classpath if they are not already present:

  * commons-logging-1.1.jar  
  * log4j-1.2.14.jar (If you choose to use log4j for logging)

* Add the following configuration files to your classpath if they are not 
  already present:
  
  * buzzsql-datasources.xml (J2SE stand-alone only)
  * commons-logging.properties
  * log4j.properties
  
* In a J2SE stand-alone environment, edit buzzsql-datasources.xml to setup 
  your database connection settings.
  
* Import com.buzzsurf.sql.* in your java files. 

  // delete
  Delete del = new Delete("delete from tbl1").execute().close();

  // insert
  Insert insert = new Insert("insert into tbl1(col_str, col_int) values (?,?)");
  insert.setArgs("asdf", 123).execute();
  int pk = insert.getGeneratedKey();
  System.out.println(pk);
  insert.close();

  // select
  Select query = new Select();
  query.setSQL("select col_pk, col_str, col_int from tbl1");
  query.execute();
  while (query.next())
    System.out.println(query.getLine());
  query.close();
 
Please see Example1 and userguide.html for more detailed information.

Last Updated: 11/04/2007