RE: bind_param_inout + DBD::ODBC

2005-10-13 Thread Jeff Urlwin
Can you please do the following:
1) get a dbi trace (level 9)
2) try a simpler function (1 with a single varchar, for example)
 
Thanks,
 
Jeff




From: Stephen More [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 13, 2005 9:20 AM
To: Jeff Urlwin
Cc: dbi-users@perl.org
Subject: Re: bind_param_inout + DBD::ODBC


I have tried the following code:

my( $sth ) = $dbh->prepare ("{call PGMRPGMLIB.SYSSTATS(?, ?,
?)}");
my( $asp ) = undef;
my( $cpu ) = undef;
my( $jobs ) = undef;
$sth->bind_param_inout(1, \$asp, 100, DBI::SQL_FLOAT );
$sth->bind_param_inout(2, \$cpu, 100, DBI::SQL_FLOAT );
$sth->bind_param_inout(3, \$jobs, 100, DBI::SQL_INTEGER );
 
$sth->execute(); 

As far as I can tell, the code looks fine compared to the
examples.

When I execute it I get the following error:
DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access
ODBC Driver]Error in assignment. (SQL-22018)(DBD: st_execute/SQLExecute
err=-1) at ./odbc.pl line 29

Is there a way I can test this using C at the unixODBC level ?
Does anyone have some sample C code that I could use to get
started ?

-Thanks
Steve More



On 10/12/05, Jeff Urlwin <[EMAIL PROTECTED]> wrote: 

DBD::ODBC support bind_param_inout...  The best way to
see an example is
to look at the tests for SQLServer and Oracle.  I don't
have a DB2
server to test against, at the moment, but I've tested
against both
SQLServer and Oracle. 

Jeff

> -Original Message-
> From: Stephen More [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, October 12, 2005 2:30 PM
> To: dbi-users@perl.org
> Subject: bind_param_inout + DBD::ODBC
>
> I am currently having a problem calling a stored
procedure on
> an iSeries.
> DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries
Access 
> ODBC Driver]Error in assignment. (SQL-22018)(DBD:
> st_execute/SQLExecute err=-1)
>
>
> In looking through the perldoc doc for DBI I found:
>
> "bind_param_inout"
> It is expected that few drivers will support this
method. The
> only driver currently known to do so is DBD::Oracle
> (DBD::ODBC may support it in a future release).
Therefore it
> should not be used for database independent
applications. 
>
> Does DBD::ODBC support bind_param_inout ??
> If not, how can you call a stored procedure from perl
using ODBC ?
>
> -Thanks
> Steve More
>





Re: bind_param_inout + DBD::ODBC

2005-10-13 Thread Stephen More
I have tried the following code:

my( $sth ) = $dbh->prepare ("{call PGMRPGMLIB.SYSSTATS(?, ?, ?)}");
my( $asp ) = undef;
my( $cpu ) = undef;
my( $jobs ) = undef;
$sth->bind_param_inout(1, \$asp, 100, DBI::SQL_FLOAT );
$sth->bind_param_inout(2, \$cpu, 100, DBI::SQL_FLOAT );
$sth->bind_param_inout(3, \$jobs, 100, DBI::SQL_INTEGER );

$sth->execute();

As far as I can tell, the code looks fine compared to the examples.

When I execute it I get the following error:
DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access ODBC
Driver]Error in assignment. (SQL-22018)(DBD: st_execute/SQLExecute err=-1)
at ./odbc.pl line 29

Is there a way I can test this using C at the unixODBC level ?
Does anyone have some sample C code that I could use to get started ?

-Thanks
Steve More


On 10/12/05, Jeff Urlwin <[EMAIL PROTECTED]> wrote:
>
> DBD::ODBC support bind_param_inout... The best way to see an example is
> to look at the tests for SQLServer and Oracle. I don't have a DB2
> server to test against, at the moment, but I've tested against both
> SQLServer and Oracle.
>
> Jeff
>
> > -Original Message-
> > From: Stephen More [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 12, 2005 2:30 PM
> > To: dbi-users@perl.org
> > Subject: bind_param_inout + DBD::ODBC
> >
> > I am currently having a problem calling a stored procedure on
> > an iSeries.
> > DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access
> > ODBC Driver]Error in assignment. (SQL-22018)(DBD:
> > st_execute/SQLExecute err=-1)
> >
> >
> > In looking through the perldoc doc for DBI I found:
> >
> > "bind_param_inout"
> > It is expected that few drivers will support this method. The
> > only driver currently known to do so is DBD::Oracle
> > (DBD::ODBC may support it in a future release). Therefore it
> > should not be used for database independent applications.
> >
> > Does DBD::ODBC support bind_param_inout ??
> > If not, how can you call a stored procedure from perl using ODBC ?
> >
> > -Thanks
> > Steve More
> >
>


RE: bind_param_inout + DBD::ODBC

2005-10-13 Thread Jeff Urlwin
DBD::ODBC support bind_param_inout...  The best way to see an example is
to look at the tests for SQLServer and Oracle.  I don't have a DB2
server to test against, at the moment, but I've tested against both
SQLServer and Oracle.

Jeff 

> -Original Message-
> From: Stephen More [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 12, 2005 2:30 PM
> To: dbi-users@perl.org
> Subject: bind_param_inout + DBD::ODBC
> 
> I am currently having a problem calling a stored procedure on 
> an iSeries.
> DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access 
> ODBC Driver]Error in assignment. (SQL-22018)(DBD: 
> st_execute/SQLExecute err=-1)
> 
> 
> In looking through the perldoc doc for DBI I found:
> 
> "bind_param_inout"
> It is expected that few drivers will support this method. The 
> only driver currently known to do so is DBD::Oracle 
> (DBD::ODBC may support it in a future release). Therefore it 
> should not be used for database independent applications.
> 
> Does DBD::ODBC support bind_param_inout ??
> If not, how can you call a stored procedure from perl using ODBC ?
> 
> -Thanks
> Steve More
> 


Re: bind_param_inout + DBD::ODBC

2005-10-12 Thread Dan Scott
DBD::DB2 (http://search.cpan.org/dist/DBD-DB2/DB2.pod) supports
bind_param_inout,
but it would require you to use the DB2 Connect Personal Edition or DB2 Connect
Unlimited for iSeries to access iSeries from your Linux, UNIX, or Windows box.

Dan

On 10/12/05, Stephen More <[EMAIL PROTECTED]> wrote:
> I am currently having a problem calling a stored procedure on an iSeries.
> DBD::ODBC::st execute failed: [unixODBC][IBM][iSeries Access ODBC
> Driver]Error in assignment. (SQL-22018)(DBD: st_execute/SQLExecute err=-1)
>
>
> In looking through the perldoc doc for DBI I found:
>
> "bind_param_inout"
> It is expected that few drivers will support this method. The only driver
> currently known to do so is
> DBD::Oracle (DBD::ODBC may support it in a future release). Therefore it
> should not be used for database
> independent applications.
>
> Does DBD::ODBC support bind_param_inout ??
> If not, how can you call a stored procedure from perl using ODBC ?
>
> -Thanks
> Steve More
>
>