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: General question
Date: Jul 2 1999 8:26PM

Saxena, Arun writes:
 > This fails  when I use stored procs
 > instead.
 > 
 > $sql  = "ProcA  host=A";
 > $sql2 = "ProcA host=B";
 > 
 > The error message  is "ProcA is not arecognized paramter option"

Please read the T-SQL manual.

If you want to run more than one stored proc you must specify the
'exec' keyword:

$sql1 = "exec proca ...";
$sql2 = "exec procb ...";

Note that you need to make sure that your strings don't run into each
other, so separating them with a carriage return is probably a good
idea.

Michael


 > 
 > Arun
 > 
 > > -----Original Message-----
 > > From:	Michael Peppler [SMTP:mpeppler@peppler.org]
 > > Sent:	Friday, July 02, 1999 11:27 AM
 > > To:	SybPerl Discussion List
 > > Subject:	Re: General question
 > > 
 > > Saxena, Arun writes:
 > >  > 
 > >  > I am doing the folowing, but does not seem to work..
 > >  > 
 > >  > $sql = "select ....";
 > >  > $sql2 = "select...";
 > >  > 
 > >  > $syb_login->dbsqlcmd($sql);
 > >  > $syb_login->dbsqlcmd($sql2);
 > >  > $syb_login->dbsqlexec;
 > >  > $syb_login->dbresults;
 > >  > 
 > >  > Am I doing somethinh wrong ?
 > > 
 > > well, you need to call dbresults() in a loop, because you're executing 
 > > two SELECT statements.
 > > 
 > > you should use something like:
 > > 
 > > while($syb_login->dbresults() != NO_MORE_RESULTS) {
 > >     while(@data = $syb_login->dbnextrow) {
 > > 	... # do something with the @data from the select
 > >     }
 > > }
 > > 
 > > Michael
 > > -- 
 > > Michael Peppler         -||-  Data Migrations Inc.
 > > mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
 > > Int. Sybase User Group  -||-  http://www.isug.com
 > > Sybase on Linux mailing list: ase-linux-list@isug.com
 > 

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com