Re: DBD::Sybase question

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
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 [email protected]).

Michael

On Thu, 2005-03-31 at 20:24, [email protected] 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  -  [email protected]  -  http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.