|
|
sybperl-l Archive
Up Prev Next
From: ckickel at micron dot net (Craig Kickel)
Subject: ct_sql always returns -205?
Date: Jan 22 1998 7:36PM
Greetings,
I've noticed an oddity in SybPerl. It seems that
whenever I use ct_sql successfully, the return code (RC) is
always set to -205.
I'm using sybperl-2.09 under Solaris 2.5.1. The
database is 11.0.2 with CTLib 10.0.2 being used for access.
Perl is version 5.004.
I've attached a code sample below. With my setup, it
prints "-205" for both the ct_sql commands. What I thought
I might get is "0" for the first and "100" for the second.
Any thoughts?
--Craig
>#!/usr/local/bin/perl
>use Sybase::CTlib;
>
>unless( $dbh = new Sybase::CTlib "perl", "passwd", "SYBASE", "testPgm" )
>{
> die "$0: Failed to connect to the database";
>}
>
>$stmt = "SELECT count(*) FROM sysusers";
>$ref = $dbh->ct_sql($stmt);
>print "Return code = $dbh->{RC}\n";
>
>$stmt = "SELECT count(*) FROM sysusers WHERE 1=0";
>$ref = $dbh->ct_sql($stmt);
>print "Return code = $dbh->{RC}\n";
_____________________________________________
Craig Kickel | (208) 368-1417
Software Engineer | ckickel@micron.net
Micron Internet Services |
_____________________________________________
|