The stored procedure support is in SVN:
See testStoredProcedure() and testStoredFunction() for examples.
Oracle has been tested on Windows only.
A word of warning: as you will see, there are three new convenient functions aimed to be used with stored procedures: in(), out() and io() (for use with IN, OUT and IN/OUT parameter types, respectively). While using in() is no different than using use(), the same is NOT true for into() and out(), which are NOT interchangeable. So, the recommended use is following:
use(), into() for parameterized queries
in(), out() and io() for stored procedure calls
Any feedback is welcome.
On 4/23/07, Keresztfalvi Laszlo < firstname.lastname@example.org> wrote:
ODBC is fine, however I would use it on Linux. I need 3 features with
Oracle. Bind variables, Stored procedure calls and BLOB. I see that
there is a binder (Binder.cpp) and test suites for BLOB. So, does
POCO::Data support all the three (with all relevant ODBC drivers)?
With queries, variables are bound both ways (i.e. input parameters and result values) through use() and into() manipulators. BLOBs are supported. The only thing I *did not* test yet is stored procedures, but I'm hoping that should work. The code in SVN runs OK on windows. On Linux, iODBC is supported but I'm not sure whether the tests have been run yet (I know it does compile with both iODBC and unixODBC). At any rate, if you have some spare time, check it out and try to write a test for stored procedures.
What you want is something like this:
session << "CREATE OR REPLACE "
"PROCEDURE storedProc(inParam IN NUMBER, outParam OUT NUMBER) IS "
"BEGIN outParam := inParam; END storedProc;" , now();
int in = 1, out = 0;
session << "BEGIN storedProc(?,?); END;" << use(in), use(out), now();
assert (out == in);
session << "DROP PROCEDURE storedProc;", now();
I'd expect the above to work, but I did not try it (and I typed it off the top of my head after a long day of work and school ;-), so if you get a chance to try it and it happens to work, let me know.