List:MySQL++« Previous MessageNext Message »
From:Jim Wallace Date:April 26 2007 11:13am
Subject:Easier way to get OUT parmeters from Stored Proc call
View as plain text  
I posted a method earlier that wrapped on SP with another doing a SELECT
on the OUT parameter(s).  Since then, I've found the wrapper can be
avoided by doing call and select from C++.  Here's an example with one
OUT, but can easily do more.

Query query = m_conn->query();

query <<  "CALL setPlayerBanStatus( %0q, %1q, %2, %3, @banned ); SELECT


Result res = playerName, reason, (int)(banned ? 1 : 0),
(int)bannerId ); // call SP

res = query.store_next(); // get select output

ret = res.size() > 0 && (LONG) != 0;

RELEASE: v2.2.3Warren Young17 Apr
  • Re: RELEASE: v2.2.3Remi Collet17 Apr
    • Re: RELEASE: v2.2.3Warren Young17 Apr
  • Re: RELEASE: v2.2.3 - Fedora RPMRemi Collet20 Apr
  • Easier way to get OUT parmeters from Stored Proc callJim Wallace26 Apr