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: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: DBD::Sybase question
Date: Apr 1 2005 6:13AM

I don't have the time to look into this right now - though what you are
trying to do should work.

I've CC'd the sybperl mailing list - that's the best place to ask these
questions (that or dbi-users@perl.org).

Michael

On Thu, 2005-03-31 at 20:24, Sheel.Mehta@ubs.com wrote:
> I am using the following code for executing procedure which pretty much works fine: 
> 
>   if ($sth->execute()) { 
>     do {
>       while($data = $sth->fetch) {
>         if($sth->{syb_result_type} == CS_STATUS_RESULT) {
>           my $result = $data->[0];
>           if ($result == -1) {
>             $applogger->fatal("\tCall x84240 $processname$entity: $sql failed");
>             exit(1);
>           }
>         } elsif($sth->{syb_result_type} == CS_ROW_RESULT) {
>           push(@res,join($sep,@$data));
>         } 
>         
>       }
>     } while($sth->{syb_more_results});
>   } else {
>     print "Execute failed : $DBI::errstr";
>     exit(1);
>   }
> 
> 
> But for procedure with statements like following it doesn't work :
> Create Procedure xyz
> as
> Begin
> 	Select "Header1"
> 	Select c1, c2, c3 From Table1
> 	Select "Header2"
> 	Select c1, c2, c3, c4, c5 From Table2
> 	Select "Header3"
> 	Select c1, c2, c3, c4, c5, c6 From Table3
> End
> 
> Questions:
> 1. Am I doing something wrong?
> 2. Or is it the limitation of DBD::Sybase module that procedure with composite SQLs and with different number of columns doesn't work? 
> 
> Please advise.
> 
> Thanks,
> -Sheel
> 
> Visit our website at http://www.ubs.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
-- 
Michael Peppler  -  mpeppler@peppler.org  -  http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html