Normal calls using ODBC to the AS/400 (iSeries etc) DB2 are quite simple
and work very well. eg create table, select, update, delete etc. However, when trying to evoke a stored procedure some problems occur. Procedures without parameters work but when trying to pass a parameter with the program it fails. e.g. c exec: 'call pgm1' works fine but c exec: 'call pgm2 parm' does not. (note: c is the connection) This could be that I'm not using the right syntax any ideas? Thanks, Theo PS Thanks, Jeffrey for your earlier e-mail. I still have some other ToolKit problems and am trying to see if ODBC can solve them. |
"Theo" <[hidden email]> wrote in message
news:bignbh$96g9h$[hidden email]... > Normal calls using ODBC to the AS/400 (iSeries etc) DB2 are quite simple > and work very well. eg create table, select, update, delete etc. > > However, when trying to evoke a stored procedure some problems occur. > Procedures without parameters work but when trying to pass a parameter > with the program it fails. > > e.g. c exec: 'call pgm1' works fine > but c exec: 'call pgm2 parm' does not. > (note: c is the connection) > > This could be that I'm not using the right syntax any ideas? I don't have any personal experience with this, but a quick check on Google ( http://www.gooogle.com ) leads me to think you should try 'call pgm2(parm)' or 'call pgm2(parm1 , parm2)' etc... You might also need to terminate with semi-colons, but I am not sure if that is required. See the DB2 documentation for more specific syntax information. Chris |
In reply to this post by Theo Pronk
hi all
>> but c exec: 'call pgm2 parm' does not. try | st | st := c prepare: 'call pgm( ?) ' st values: #( 1) st paramCols: #( aDBCollAttr) " aDBCollAttr is one of DBCollAttr class" st exec i' thinks this work . hope this help MDC "Theo" <[hidden email]> escribió en el mensaje news:bignbh$96g9h$[hidden email]... > Normal calls using ODBC to the AS/400 (iSeries etc) DB2 are quite simple > and work very well. eg create table, select, update, delete etc. > > However, when trying to evoke a stored procedure some problems occur. > Procedures without parameters work but when trying to pass a parameter > with the program it fails. > > e.g. c exec: 'call pgm1' works fine > > but c exec: 'call pgm2 parm' does not. > > (note: c is the connection) > > This could be that I'm not using the right syntax any ideas? > > > Thanks, > Theo > > PS Thanks, Jeffrey for your earlier e-mail. I still have some other > ToolKit problems and am trying to see if ODBC can solve them. > |
In reply to this post by Theo Pronk
Theo
You wrote in message news:bignbh$96g9h$[hidden email]... > Normal calls using ODBC to the AS/400 (iSeries etc) DB2 are quite simple > and work very well. eg create table, select, update, delete etc. > > However, when trying to evoke a stored procedure some problems occur. > Procedures without parameters work but when trying to pass a parameter > with the program it fails. > ... If you find that others' suggestions do not solve your problems and you are using prepared statements, then you might like to try the following hot fix patch: http://www.object-arts.com/Lib/Update/Dolphin/5.1/1260.st Essentially this corrects a problem initially found in conjunction with SQL Server that the DBConnection packages always specifies the parameters direction an in/out regardless of the actual parameter direction. This patch will be included in the forthcoming Patch Level 2 for Dolphin 5.1. Regards Blair P.S. http://www.object-arts.com/Lib/Update/Dolphin/5.1/51PL2List.htm lists other patches that are available at the same location. The naming scheme for the patch files is the same as the above link, i.e. substitute the defect number as the file stem. The exceptions are #1258 and #1259 which require new DLLs; IPDolphinToGo.DLL and DolphinCR005.DLL respectively. The former is available as a zip or dll from the same location. #1259 is a minor cosmetic issue so we haven't made a new compiler available yet. |
Free forum by Nabble | Edit this page |