cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Painter-Wakefield" <paint...@mc.duke.edu>
Subject Re: esql stored procedure problem - one solution
Date Fri, 02 May 2003 20:58:05 GMT





congratulations!

This kind of thing seems to come up often enough that we (the Cocoon
community) ought to consider adding database-specific documentation to the
ESQL logicsheet documents.  Each jdbc driver has its own quirks.

-Christopher



                                                                                         
                                             
                      Jeff Sexton                                                        
                                             
                      <jsexton@odshp.co        To:       cocoon-users@xml.apache.org  
                                                
                      m>                       cc:                                    
                                                
                                               Subject:  Re: esql stored procedure problem
- one solution                              
                      05/02/2003 04:52                                                   
                                             
                      PM                                                                 
                                             
                      Please respond to                                                  
                                             
                      cocoon-users                                                       
                                             
                                                                                         
                                             
                                                                                         
                                             





For jConnect/Sybase, using a PreparedStatement instead of a
CallableStatement for a stored procedure works if the
allow-multiple-results option is also used.  Prior to the fragment below,
I build the "call myProc p1, p2, p3" statement as a StringBuffer, then
exec it like this:

    <esql:connection>
      <esql:allow-multiple-results>yes</esql:allow-multiple-results>
      <esql:pool>odsdb02_pool</esql:pool>
        <esql:execute-query>
          <esql:query>
            <xsp:expr>queryString.toString()</xsp:expr>
          </esql:query>
          <esql:results>
            <esql:row-results>
              <esql:get-string column="MyColumn"/>
            </esql:row-results>
          </esql:results>
          etc....

This works!

Whew, what a long day....



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message