Hi all,
i try to execute a stored procedure via jdbc on sybase.
Code:
...
Session session = null;
java.sql.ResultSet result = null;
java.sql.PreparedStatement st;
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
session = sessionFactory.openSession();
try {
st = session.connection().prepareCall("{call ta_generic_password_check (?,?)}");
session.connection().setAutoCommit(true);
st.setString(1, userName);
st.setString(2, hash);
result = st.executeQuery();
while (result.next()){
System.out.println(result.getString(1));
}
} catch (HibernateException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
My problem: result.next is never true. I tried the statement in asp code. There it worked fine. What am I doing wrong?
Regards,
Barnti