Re: How to call stored procedure using DBIx?
- From: smallpond <smallpond@xxxxxxxx>
- Date: Fri, 28 Dec 2007 08:16:12 -0800 (PST)
On Dec 28, 10:51 am, Tony Winslow <tonywinslow1...@xxxxxxxxx> wrote:
smallpond wrote:
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:The env: Catalyst, DBIx::Class, MySQL
I've stored procedures defined in my database schema, and I need to callDBIx::What? In DBI, with a DBD::Oracle driver, I call stored procedures
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?
with a database handle thus:
$dbh->do( "Begin somepackage.someprocedure; End;" );
It's picky about the semicolons.
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
Of course, I've installed it.
I can connect to MySQL using DBIx::Class, and it runs smoothly.
Yet I don't know how to call my stored procedures directly using
the the API provided by DBIx::Class rather than that of DBI.
Oh. I found this:
http://www.perlmonks.org/?node_id=625709
.
- References:
- Re: [newbie]How to call stored procedure using DBIx?
- From: Peter Scott
- Re: How to call stored procedure using DBIx?
- From: smallpond
- Re: [newbie]How to call stored procedure using DBIx?
- Prev by Date: Re: How to call stored procedure using DBIx?
- Next by Date: Re: PERL + Repeat header on every page while printing excel
- Previous by thread: Re: How to call stored procedure using DBIx?
- Next by thread: Re: [newbie]How to call stored procedure using DBIx?
- Index(es):
Relevant Pages
|