superjtc has asked for the wisdom of the Perl Monks concerning the following question:

I use DBD::ODBC to connect to informix database, but I don't know how to call procedures. my code like this:
use constant DBDRIVE => "ODBC"; use constant DBNAME => "informix"; use constant DBUSER => "user"; use constant DBPASS => "pass"; my $dbh = DBI->connect("dbi:".DBDRIVE.":".DBNAME,DBUSER,DBPASS, + {RaiseError=>0,PrintError=>0,AutoCommit=>1}) or die $DBI::errstr; $dbh->do("execute procedure sp_test('2010-05-01 00:00:00')") or warn "failed\n"; $dbh->disconnect();
When I run it, it didn't get error. But I get nothing when I check the database. The store procedure works fine if I run it in database directly.

Replies are listed 'Best First'.
Re: How do I call informix stored procedures from Perl?
by marto (Cardinal) on Jun 14, 2010 at 15:41 UTC

    Did you try the advice given when you asked here regarding RaiseError, PrintError and DBI tracing?

Re: How do I call informix stored procedures from Perl?
by stefbv (Priest) on Jun 15, 2010 at 07:02 UTC
    I'm not familiar with Informix, but I'm curious why aren't you using DBD::Informix?

    It seems to have support for EXECUTE PROCEDURE.

    Stefan