Binding to Output Parameters using DBD::ODBC

2001-04-09 Thread Bruce Hodge

I am using DBD::ODBC drivers to connect to a Sybase 11.5 database. I have 
migrated a bunch of procedures from Oracle 8i that use output parameters to 
return data. I was migrating an abstract database interface that I built 
dbObject.pm, which previously called the Oracle stored procedures. I 
verified that the ODBC prepare statement was being correctly built {call 
get_seq(?,?,?)} and when I called DBI::bind_param_inout on the 3rd output 
parameter I got the error message "Can't bind output values (currently)". 
Now I know I am not the only one who has ever tried this so can someone 
please tell me how to bind Perl variables to stored procedure's output 
parameters using DBD::ODBC.

Thanks,
Bruce


```
   (o o)
--oOO--(_)--OOo
Bruce HodgeDynaScript Internet Language
P.O. Box 428   http://www.dynascript.com
Greenfield, NY 12833   [EMAIL PROTECTED]
-o00-00o---




Re: Binding to Output Parameters using DBD::ODBC

2001-04-09 Thread Michael Peppler

Curt Russell Crandall writes:
 > Can't do it... the Sybase driver does not allow placeholders in a prepare
 > of a stored proc.  I spent the better part of a day trying to figure out
 > why my code wasn't working when doing something similar until I read
 > Cheetah's section on DBD::Sybase.

The next version of DBD::Sybase *will* allow this (although it still
won't handle in/out bindings)

Michael
-- 
Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED]
http://www.mbay.net/~mpeppler - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: [EMAIL PROTECTED]



Re: Binding to Output Parameters using DBD::ODBC

2001-04-09 Thread Curt Russell Crandall

Ooops, I thought you were using the DBD::Sybase driver.  Sorry.

On Mon, 9 Apr 2001, Bruce Hodge wrote:

> I am using DBD::ODBC drivers to connect to a Sybase 11.5 database. I have 
> migrated a bunch of procedures from Oracle 8i that use output parameters to 
> return data. I was migrating an abstract database interface that I built 
> dbObject.pm, which previously called the Oracle stored procedures. I 
> verified that the ODBC prepare statement was being correctly built {call 
> get_seq(?,?,?)} and when I called DBI::bind_param_inout on the 3rd output 
> parameter I got the error message "Can't bind output values (currently)". 
> Now I know I am not the only one who has ever tried this so can someone 
> please tell me how to bind Perl variables to stored procedure's output 
> parameters using DBD::ODBC.
> 
> Thanks,
> Bruce
> 
> 
> ```
>(o o)
> --oOO--(_)--OOo
> Bruce HodgeDynaScript Internet Language
> P.O. Box 428   http://www.dynascript.com
> Greenfield, NY 12833   [EMAIL PROTECTED]
> -o00-00o---
> 
> 




Re: Binding to Output Parameters using DBD::ODBC

2001-04-09 Thread Curt Russell Crandall

Can't do it... the Sybase driver does not allow placeholders in a prepare
of a stored proc.  I spent the better part of a day trying to figure out
why my code wasn't working when doing something similar until I read
Cheetah's section on DBD::Sybase.

--Curt

On Mon, 9 Apr 2001, Bruce Hodge wrote:

> I am using DBD::ODBC drivers to connect to a Sybase 11.5 database. I have 
> migrated a bunch of procedures from Oracle 8i that use output parameters to 
> return data. I was migrating an abstract database interface that I built 
> dbObject.pm, which previously called the Oracle stored procedures. I 
> verified that the ODBC prepare statement was being correctly built {call 
> get_seq(?,?,?)} and when I called DBI::bind_param_inout on the 3rd output 
> parameter I got the error message "Can't bind output values (currently)". 
> Now I know I am not the only one who has ever tried this so can someone 
> please tell me how to bind Perl variables to stored procedure's output 
> parameters using DBD::ODBC.
> 
> Thanks,
> Bruce
> 
> 
> ```
>(o o)
> --oOO--(_)--OOo
> Bruce HodgeDynaScript Internet Language
> P.O. Box 428   http://www.dynascript.com
> Greenfield, NY 12833   [EMAIL PROTECTED]
> -o00-00o---
> 
> 




Re: Binding to Output Parameters using DBD::ODBC

2001-04-09 Thread Michael Peppler

Bruce Hodge writes:
 > I am using DBD::ODBC drivers to connect to a Sybase 11.5 database. I have 
 > migrated a bunch of procedures from Oracle 8i that use output parameters to 
 > return data. I was migrating an abstract database interface that I built 
 > dbObject.pm, which previously called the Oracle stored procedures. I 
 > verified that the ODBC prepare statement was being correctly built {call 
 > get_seq(?,?,?)} and when I called DBI::bind_param_inout on the 3rd output 
 > parameter I got the error message "Can't bind output values (currently)". 
 > Now I know I am not the only one who has ever tried this so can someone 
 > please tell me how to bind Perl variables to stored procedure's output 
 > parameters using DBD::ODBC.

The OUTPUT params are probably returned as regular result rows in ODBC
(that's the way they are returned when using the Sybase libraries...)

Michael
-- 
Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED]
http://www.mbay.net/~mpeppler - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: [EMAIL PROTECTED]



Binding to Output Parameters using DBD::ODBC

2001-04-09 Thread Bruce Hodge

I am using DBD::ODBC drivers to connect to a Sybase 11.5 database. I have 
migrated a bunch of procedures from Oracle 8i that use output parameters to 
return data. I was migrating an abstract database interface that I built 
dbObject.pm, which previously called the Oracle stored procedures. I 
verified that the ODBC prepare statement was being correctly built {call 
get_seq(?,?,?)} and when I called DBI::bind_param_inout on the 3rd output 
parameter I got the error message "Can't bind output values (currently)". 
Now I know I am not the only one who has ever tried this so can someone 
please tell me how to bind Perl variables to stored procedure's output 
parameters using DBD::ODBC.

Thanks,
Bruce


```
   (o o)
--oOO--(_)--OOo
Bruce HodgeDynaScript Internet Language
P.O. Box 428   http://www.dynascript.com
Greenfield, NY 12833   [EMAIL PROTECTED]
-o00-00o---