List:MySQL++« Previous MessageNext Message »
From:Edward Diener Date:January 28 2009 5:13am
Subject:Re: Calling stored procedure and returning result in SSQLS structure
View as plain text  
Warren Young wrote:
 > Edward Diener wrote:
 >>
 >> How can I get my StoreQueryResult to store the row result of my query
 >> into a vector of my SSQLS structure ? How do I know which result is
 >> the row result of my query as opposed to the status result which gives
 >> only a return status from my stored procedure ?
 >
 > You'd have to modify Query::storein() to teach it about multi-results.
 > It might be better to fork it, and write storein_multi() instead.

I will look at the source code.

 >
 > I have never used stored procedures, because I've never run into a
 > situation where the optimization or security they offer mattered enough
 > to overcome the associated problems.  So, I have essentially no
 > expertise to draw on, nor interest in seeing the weakness fixed.  I'm
 > willing to discuss patches to do it, but mostly you'd be on your own to
 > implement it.

The issue is really not stored procedures but rather how to take 
multiple results returned from a query and be able to store them in 
SSQLS structures. This is obviously done if just a single result is 
returned so it seems it should be possible to do it for multiple 
results. Your first remark in your answer above tells me you know that.

 >
 >> BTW the example in section 3.12 of the user manual calls a stored
 >> procedure when the MySQL version is 5.0 or higher but does not set the
 >> mysqlpp::MultiResultsOption(true) option. Is this an error in the
 >> example or is there something in the example which would cause it to
 >> work anyway ?
 >
 > The latter.  It does set MultiStatementsOption(), which is sufficient.
 > See http://dev.mysql.com/doc/refman/5.0/en/mysql-set-server-option.html

I do see that in the notes and realize that the example is correct.

Thread
Calling stored procedure and returning result in SSQLS structureEdward Diener28 Jan
  • Re: Calling stored procedure and returning result in SSQLS structureWarren Young28 Jan
    • RE: Calling stored procedure and returning result in SSQLS structureJim Wallace28 Jan
      • Re: Calling stored procedure and returning result in SSQLS structureWarren Young28 Jan
        • RE: Calling stored procedure and returning result in SSQLS structureJim Wallace28 Jan
Re: Calling stored procedure and returning result in SSQLS structureEdward Diener28 Jan
Re: Calling stored procedure and returning result in SSQLS structureEdward Diener28 Jan
Re: Calling stored procedure and returning result in SSQLS structureEdward Diener28 Jan
Re: Calling stored procedure and returning result in SSQLS structureEdward Diener28 Jan