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: Ronald Page <Ron dot Page at asu dot edu>
Subject: ct_sql and v2.08
Date: Dec 2 1997 3:56PM

In the "CHANGES" file for Sybperl v2.08 (I'm running Perl 5.004_001), I
notice:

"Fixed Sybase::CTlib::ct_sql() to set $dbh->{RC} to CS_FAIL when an
error occurs in the processing."

I installed 2.08 and it seems to be working as before.  I get a return
code of -205 for everything.  Specifically, I am doing an INSERT, and
want to check the return code for failure.  Here is an example:

      $ref = $dbh->ct_sql("insert into TEST (test) values (1)");
      print "$dbh->{'RC'} \n";

In stepping through CTlib.pm, I notice the $rc is set correctly until
the final line of output is read by:

    while(($rc = $db->ct_results($res_type)) == &CS_SUCCEED) {

Inserts that succeed get set the same rc as ones that don't (I haven't
tested return codes on Selects).  What am I doing wrong?  TIA.

--
Ronald Page
Electronic Messaging Applications & Consulting
Arizona State University