Topic
  • No replies
KGMC_Orkan_Sobotawan
1 Post

Pinned topic IBM Data Studio Won't Create Stored Proc, dbaccess Does?

‏2012-09-04T18:36:11Z |
Just installed IBM Data Studio and it's been a big help. Have noticed that IBM Data Studio won't run code that dbaccess will.

I'm using the most current version of IBM Data Studio with the JDBC driver that comes with it for Informix 9.4. This is on a XP machine.

Here is an example of a stored proc that won't run on IBM Data Studio but will run on dbaccess. I know dbaccess probably doesn't depend on odbc like IBM Data Studio does, but I would like to use IBM Data Studio if possible.

create procedure up_del_rotcal(
start_dt DATE , end_dt DATE ) RETURNS INTEGER

DEFINE numrecs int
LET numrecs = 0
DELETE
FROM caa61340
WHERE caa61340001 IN
(select caa61140001
from caa61140
WHERE caa61140005 BETWEEN start_dt AND end_dt
AND moduser='soft'
)
DELETE
FROM caa61240
WHERE caa61240002 IN
(select caa61140001
from caa61140
WHERE caa61140005 BETWEEN start_dt AND end_dt
AND moduser='soft'
)
DELETE
from caa61140
WHERE caa61140005 BETWEEN start_dt AND end_dt
AND moduser='soft'
let numrecs = DBINFO('sqlca.sqlerrd2')
return numrecs
end procedure
Failed queries => 8
Total execution time => 0 ms