Re: How to call stored procedure using DBIx?
- From: smallpond <smallpond@xxxxxxxx>
- Date: Fri, 28 Dec 2007 07:41:02 -0800 (PST)
On Dec 28, 9:58 am, Tony Winslow <tonywinslow1...@xxxxxxxxx> wrote:
Peter Scott wrote:
On Fri, 28 Dec 2007 21:19:06 +0800, Tony Winslow wrote:
I've stored procedures defined in my database schema, and I need to call
them in my code.
The arbitrary-sql approach won't help since it writes sql statements in
source code to act as stored procedures. So could I do that in DBIx?
DBIx::What? In DBI, with a DBD::Oracle driver, I call stored procedures
with a database handle thus:
$dbh->do( "Begin somepackage.someprocedure; End;" );
It's picky about the semicolons.
The env: Catalyst, DBIx::Class, MySQL
If I can get a $dbh from what I already have from DBIx::Class, the
problem can be solved. Yet I can figure out a way to get it.
DBI is the generic database interface. To connect to MySQL you
need the DBD::mysql module.
http://search.cpan.org/~capttofu/DBD-mysql-4.006/lib/DBD/mysql.pm
--S
.
- References:
- Re: [newbie]How to call stored procedure using DBIx?
- From: Peter Scott
- Re: [newbie]How to call stored procedure using DBIx?
- Prev by Date: Re: PERL + Repeat header on every page while printing excel
- Next by Date: Re: How to call stored procedure using DBIx?
- Previous by thread: Re: [newbie]How to call stored procedure using DBIx?
- Next by thread: Re: How to call stored procedure using DBIx?
- Index(es):
Relevant Pages
|