Skip to Content
Former Member
Mar 12, 2007 at 03:25 PM

iCommand FixedQueryWithOutput Oracle PL/SQL Stored Procedure


Assume a stored procedure, delivered in a package....

     user.package.storedproc( input-parameter, input-output cursor )

If a "FixedQueryWithOutput" is used to run this procedure.....

     user.package.storedproc( '[Param.1]', ? )

The procedure runs correctly, and returns valid output (assuming that query template has valid data in the "parameters" tab).

Further, if the stored-procedure/query-template is wired into an iCommand applet that has a Param value explicitly specified...

<applet  name	     =    "PMilestoneApplet" 
          width     =    "1" 
          height    =    "1"
          code      =    "iCommand" 
          codebase  =    "/Illuminator/Classes" 
          archive   =    ""             mayscript>

       <param    name      =    "QueryTemplate" 
                      value     =    "Ipath/to/template/file" />
       <param    name      =    "Param.1"  
                     value       =    "DXBP004500"  />

The web page that uses the iCommand sucessfully retrieves the expected data.

If I attempt to modify the parameter through JavaScript...

     var CmdApplet02         = document.PMilestoneApplet  ;
     var commandObject02 = CmdApplet.getQueryObject() ;

     commandObject02.setParam( 1, "DXBP004800" ) ;
    if  ( !  CmdApplet02.executeCommand() ) 
     <do something to handle error>

The iCommand runs sucessfully, but returns no data. I have used "commandObject02.getParam(1)" as a sanity check to fetch/display the parameter before and after the call to iCommand, and the data is as expected.

If I provide a default value for the parameter within the applet, the applet returns data associated with the default-parameter, not with the parameter dynamically set with JavaScript.

It begins to look as if the iCommand will not process parameters within a FixedQueryWithOutput (I have sucessfully used iCommand to set the parameters on "normal" queries).

PS...I owe thanks to all of you who have responed to me in the past, and I wish I could assign points, but it seems that this Forum "forgets" who I am every couple of weeks, and I loose access to my previous posts!!