Hi all,
I have a code like this:
Code:
try {
Session session = HibernateManager.getInstance().getSession();
Customer customer = new Customer();
customer.setCustomerId(1);
customer.setCompanyName("My company");
session.save(customer);
System.out.println("Done");
session.flush();
session.close();
} catch (Exception e) {
// TODO: handle exception
}
when execute i got the error as following:
Code:
java.sql.SQLWarning: [Microsoft][SQLServer 2000 Driver for JDBC]Database changed to Northwind
at com.microsoft.jdbc.base.BaseWarnings.createSQLWarning(Unknown Source)
at com.microsoft.jdbc.base.BaseWarnings.get(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.getWarnings(Unknown Source)
at org.hibernate.util.JDBCExceptionReporter.logAndClearWarnings(JDBCExceptionReporter.java:22)
at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:449)
at org.hibernate.jdbc.ConnectionManager.cleanup(ConnectionManager.java:385)
at org.hibernate.jdbc.ConnectionManager.close(ConnectionManager.java:324)
at org.hibernate.impl.SessionImpl.close(SessionImpl.java:298)
at mine.hibernate.impl.ContactManager.updateABC(ContactManager.java:30)
at mine.hibernate.impl.ContactManager.main(ContactManager.java:47)
And data not inserted into database.
Could anyone tell me why? and how to overcome this issue?
Thanks