Strange problem. I have a stored procedure that selects a few values into a temp table and then uses that temp table to delete some rows from another table:
SELECT id into #mytemp FROM tableA WHERE id=@id
DELETE from tableB WHERE id in
(select id from #mytemp)
the proc works fine when I run it from my database client. But when I use session.connection() to get the raw JDBC connection and run:
CallableStatement cs = c.prepareCall("{ call del_proc(?) }");
cs.setInt(1, id);
cs.execute();
I get no error, no exception, but the proc doesn't work. i.e. nothing gets deleted. Is this a transaction issue with the temp table?
|