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: Trond Straume <trond dot straume at online dot no>
Subject: Problems using ct_command()
Date: Mar 19 2001 7:52PM

I am having trouble using the ct_command()/ct_execute(), but not using 
ct_sql(). I am getting this errormessage from the commandprompt when 
executing the script.

Open Client Message:
Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (16)
Message String: ct_cmd_drop(): user api layer: external error: This routine 
cannot be called while results are pending for a command that has been sent 
to the server.

This is my perl code, generating the error. Any suggestions to what I can 
do to resolve this problem?

#!/usr/bin/perl

BEGIN {
     $ENV{SYBASE} = '/opt/sybase-11.9.2';
}

print "Content-type: text/html\n\n";


$uid = "xxx
$pwd = "xxx
$srv = "xxx

use Sybase::CTlib;
$db = Sybase::CTlib->ct_connect($uid, $pwd, $srv);

db->ct_cancel('CS_CANCEL_ALL'); #Adding this command didn't help

$db->ct_execute("SELECT * FROM trond") || die "execute failed!";

Regards
Trond Straume