in reply to [DbIx::Class] How to execute stored procedure?
What works for me in DBIx::Simple, using Oracle, is a call like this:
(In Oracle, to call a procedure from SQL, is to put it in an anonymous block.)$db->query('BEGIN sp_name(?,?); END;', $param1, $param2);
So from DBI, I just treat the call to the PL/SQL block as a straightforward SQL call, with support for placeholders for the parameters. You don't have to use DBIx::Simple; in plain DBI you could use the do method, in virtually the same way.
I think you should do the same, with MSSQL: call the syntax you have to use as a straightforward SQL call, and use placeholders.
I'm quite sure DBIx::Class has ways to directly embedding SQL calls in your modules, and that's the route to take.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: [DBIx::Class] How to execute stored procedure?
by dreel (Sexton) on May 27, 2007 at 12:06 UTC |