Ask a Question related to PERL Modules, Design and Development.
-
daglis@gmail.com #1
Sybase Stored Procedure issue
I am using DBI to connect to Sybase and run a stored procedure. The
perl script fails in the end with error:
DBD::Sybase::st fetchrow_array failed: Server message number=2737
severity=16 state=1 line=5 server=NJICELXSYBPRD2 text=Message passed to
PRINT must be of type CHAR or VARCHAR.
DBD::Sybase::st fetchrow_array failed: Server message number=2737
severity=16 state=1 line=5 server=NJICELXSYBPRD2 text=Message passed to
PRINT must be of type CHAR or VARCHAR.
ith error:
I noticed at the end after my procedure finishes, there is still some
data and it is 0. Why would this happen, I noticed that the stored
procedure returns a null after it completes.
Here is the code snippet:
my $sth = $dbh->prepare(qq[
declare \@name int
execute \@name = p_clearalldown \'$deskRegion\'
select \@name
print \@name
]);
if (! ($sth->execute() )) {
LogErrorAndDie ("Sybase Stored procedure p_clearalldown
failed".$dbh->errstr);
}
{
while(@data = $sth->fetchrow_array) {
## do something
print "data is @data\n";
print "$sth->{syb_result_type}\n";
}
redo if $sth->{syb_more_results};
}
if($sth->err())
{
LogErrorAndDie ("Sybase Stored procedure p_clearalldown failed
$dbh,$sth")
}
Here is the Ending part of the stored proc: THere are not OUTPUT
params.
delete ICE_AMX_PL_HIER
if ( @@rowcount < @delete_row_count )
begin
select "in ice_amx"
commit tran
select @leave_loop=1
break
end
commit tran
end
commit tran
Select "End Time: " + convert(varchar(35),getdate())
daglis@gmail.com Guest
-
Sybase stored procedure vs. CFQUERY
I have a stored procedure in Sybase using a UNION that gives me errors when trying to add an 'Order By' clause. However, if I run the same SQL in... -
CF5 to MX7 Problem: Sybase Stored Proc's dont work right
Has anyone else had this problem? Stored procedures that worked with CF5 work differently in MX7. Some work part of the time, others not at all.... -
Moving from Sybase to PostgreSQL - Stored Procedures
Hi, I'm moving from Sybase to pgsql but have problems with stored procedures. The typical procedure uses a) named parameters, b) local... -
Moving from Sybase to Postgres - Stored Procedures
Hi, I am moving from Sybase to pgsql but have problems with stored procedures. The typical procedure uses a) named parameters, b) local... -
need help on a stored procedure
I have 2 tables. table1 and table2 I do a select on table1 and join table 2 on id. I want to check newprice in table1. if it is null, I want to...



Reply With Quote

