Hibernate version:2.1.5
Name and version of the database you are using:MSSQL Server 8
Hello,
I'm trying to call stored procedure using hibernate.
My code is following:
String query = "exec storedProc";
Session sess= (Action.getSessionFactory()).openSession();
Connection conn = sess.connection();
Statement st = conn.createStatement();
conn.commit();
//conn.close();
sess.close();
my hibernate.properties file:
hibernate.dialect=net.sf.hibernate.dialect.SQLServerDialect
hibernate.connection.datasource=java:comp/env/jdbc/DB
hibernate.show_sql=true
The problem is that aldow I don't get any exceptions the stored procedure doesn't do anything (I tried to print query to console, and paste it to query analizer. The query is valid). If you know how to solve this, please help. It's been driving my crazy for couple of hours :(
|