Sorry I read over and figured I needed to provide more info.
In both my applications I am using JDBC to connect to the database.
Here is the code.
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Class.forName(dbDriver);
Connection con = DriverManager.getConnection(dbUrl + ";databaseName=" + dbName,dbUser,dbPass);
Session ses = sessionFactory.openSession(con);
Transaction transaction = ses.beginTransaction();
net.sf.hibernate.Query q = ses.createQuery("from ItemXstcost");
List lst = q.list();
int totalCount = lst.size();
int listnum = 0;
if (totalCount > 0) {
Iterator tempIter = lst.iterator();
.................
|