PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Robert_Gorrebeeck at concentra dot com
Subject: Re: Output Parameters Variable Types allowed from Stored Procedure using DBI
Date: Sep 15 2006 1:37PM

Here is an example of what I am trying to do.  Passing in one input 
parameter and expecting an output parameter that is declared a numeric(9) 
within the stored procedure.

sth=$dbh->prepare("exec $stored_procedure @in_parm0 = ?, @out_parm1 = ? 
OUTPUT");
$sth->execute($xtrct_prcs_id, $rc);
my @results = $sth->syb_output_params();

Here is the error that I am receiving.

"DBD::Sybase::st execute failed: Server message number=257 severity=16 
state=1 line=0 server=advoltpqa procedure=test_procedure text=Implicit 
conversion from datatype 'NUMERIC' to 'VARCHAR' is not allowed.  Use the 
CONVERT function to run this query."

Any help would be appreciated.
Thanks

Robert Gorrebeeck
Concentra Online Services
972.725.6956
Robert_Gorrebeeck@concentra.com



michael.peppler@bnpparibas.com 
09/15/2006 08:28 AM

To
Robert_Gorrebeeck@concentra.com
cc
sybperl-l@peppler.org
Subject
Re: Output Parameters Variable Types allowed from Stored Procedure using 
DBI







Please post a short example of what you are trying to do, and the actual 
error message that you get. 

Michael 




Internet 
Robert_Gorrebeeck@concentra.com@peppler.org - 15.09.2006 15:22 
  
Sent by:        owner-sybperl-l@peppler.org 
To:        sybperl-l 
cc:         
Subject:        Output Parameters Variable Types allowed from Stored 
Procedure using DBI 



All 

Pretty new to PERL so I am still getting adjusted to it. 

I am trying to call a stored procedure using DBI.  But when I want to 
return a output parameter that is a Numeric (or Int or Money, basically 
anything that not is a Varchar) it says it is not allowed and I should use 
the convert function. 

Problem is, is that I do not own the stored procedure and can't change the 
logic to convert the value upon return. 
Is there a way to allow my call to handle the output parameter of Numeric, 
etc? 

Thanks for any help 

Robert Gorrebeeck 
Concentra Online Services 
972.725.6956 
Robert_Gorrebeeck@concentra.com 

****** CONFIDENTIALITY NOTICE ****** 
NOTICE: This e-mail message and all attachments transmitted with it may 
contain legally privileged and confidential information intended solely 
for the use of the addressee. If the reader of this message is not the 
intended recipient, you are hereby notified that any reading, 
dissemination, distribution, copying, or other use of this message or its 
attachments is strictly prohibited. If you have received this message in 
error, please notify the sender immediately and delete this message from 
your system. Thank you. 



This message and any attachments (the "message") is
intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and 
immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole 
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not 
therefore be liable for the message if modified. 

                ---------------------------------------------

Ce message et toutes les pieces jointes (ci-apres le 
"message") sont etablis a l'intention exclusive de ses 
destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir 
immediatement l'expediteur. Toute utilisation de ce 
message non conforme a sa destination, toute diffusion 
ou toute publication, totale ou partielle, est interdite, sauf 
autorisation expresse. L'internet ne permettant pas 
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce 
message, dans l'hypothese ou il aurait ete modifie.



****** CONFIDENTIALITY NOTICE ******
NOTICE: This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If the reader of this message is not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately and delete this message from your system. Thank you.