Announcement Announcement Module
Collapse
No announcement yet.
what is JConnection? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • what is JConnection?

    Hi there.
    Is there anyone who know about JConnction? I want to use it in my project is a university project and I m supposed to do it with JConnction.I want to know how it works and where can I find more information about?

  • #2
    hi vana
    jconnection is related to shine pattern
    This package helps developers to work with JDBC and Hibernate easier than before.
    JConnection is a tool for developers at the DB layer that solve lots of amateursí problems. This tool helps you to work with JDBC and Hibernate.
    erfer to http://community.jboss.org/blogs/bah...e-java-pattern

    below i put a sample code for you
    enjoy the code vana

    Code:
    package db;
    
    import org.j2os.shine.jconnection.*;
    
    import java.sql.ResultSet;
    
    public class DAO {
        public static void main(String[] args) throws Exception {
            JDBC mydb = new JDBC();
            System.out.println(mydb.login("com.mysql.jdbc.Driver",
                    "jdbc:mysql://localhost/j2os", "root", "bahador", true));
            mydb.executeSQLQuery("insert into product (name) values ('test')");
            mydb.commit();
    
            //////////////////////////////////////////////////////////////////
            mydb.login("com.mysql.jdbc.Driver", "jdbc:mysql://localhost/j2os",
                "root", "bahador", true);
    
            ResultSet r = mydb.getSQLQueryContent("select * from product");
    
            while (r.next()) {
                System.out.println(r.getString("name"));
            }
    
            mydb.commit();
        }
    }

    Comment

    Working...
    X