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 MBAY dot NET>
Subject: Re: Return Stati
Date: Mar 20 1998 10:52PM

DetlefEnge wrote:
> 
> Hi,
> 
> How can I find out if a statement produced an error or finished ok, using
> Sybase::CTlib? - Actually the question is, are there any variables that
> indicate the status of a statement?

$dbh->{RC} is set to CS_FAIL if the sql statement you run via
ct_sql() fails.

> 
> e.g.:
> 
> $dbh->ct_sql('insert into bla values(bla,bla,bla)'); # ok
> $dbh->ct_sql(insert into bla values(bla,bla,bla)'); # error because of
> duplicate key
> 
> How can I suppress the messages to stderr?

See the docs on the server callbacks, and the ctutil.pl file.

Michael
-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@datamig.com    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com