Ok, I figured out part of my problem. One of the parameters was an output
parameter. I can call the stored procedure successfully if I put a bind value
in. So,
my $statement = "call add_person (sql_first_name = 'keith',sql_last_name =
'graham', sql_status = 'n', sql_person_id = ?)";
However, now I can't figure out how to get the output value in a perl variable.
I would think I would use bind_param_inout, but the documentation does not seem
to indicate that DBD::ASAny supports this. Anyone know how I am supposed to get
my output value out?
Sherry Graham
[EMAIL PROTECTED]
Applied Systems Intelligence, Inc.
Sherry Graham wrote:
> I just tried it and I get:
>
> Bad hash at /usr/lib/perl5/site_perl/5.6.0/i386-linux/DBI.pm line 940, <INP>
> line 14.
>
> Sherry
>
> Phillip Perkins wrote:
>
> > Have you tried $records_affected = $dbh->do($statement); ?
> >
> > Sherry Graham wrote:
> >
> > > I am a newbie to DBI programming with ASA. I can connect to my database
> > > and make simple SQL queries just fine, but I am unable to call a stored
> > > procedure. Is there something special that needs to be done?
> > >
> > > The error I get is Bad hash at ./program.pl line 427
> > >
> > > My stored procedure statements are:
> > >
> > > my $statement = "call add_person (sql_first_name =
> > > 'sherry',sql_last_name = 'graham', sql_status = 'n', sql_person_id =
> > > 1)";
> > > my $sth = $dbh->prepare($statement);
> > > $sth->execute;
> > > $sth->finish;
> > >
> > > Any suggestions?
> > >
> > > Thanks!
> > > Sherry Graham
> > > [EMAIL PROTECTED]
> > > Applied Systems Intelligence