Hi Max,
Sorry for the typo, its getStudent , drop the s. The procedure in no way returns any list.
I am bit disappointed but I dont want to dump Hibernate for one such small shortcoming.
But I get into another problem then, if I keep Hibernate, I have to do the plain JDBC stuff through Hibernate for stored procedures.
Do you think there is any way to do the jdbc stuff through Hibernate? Please ignore typos.
Thanks a lot for earlier reply. I am adding the jdbcd code snippet which you can see and comment.
with warm regards
Niel
Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@something ", "scott" ,"tiger");
CallableStatement stmt = con.prepareCall("{call getstudent(?,?)}");
// Here I am setting the Student Id
stmt.setInt(1, 7844);
stmt.registerOutParameter(2, java.sql.Types.VARCHAR);
stmt.executeQuery();
// Here I am getting the Student Name from out parameter.
System.out.println("Name " + stmt.getString(2));
|