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: error inserting
Date: May 22 1998 12:11AM

Khanh-Linh Huynh writes:
 > 
 > Hi, I'm doing a simple table inserting.  I read data into an array and insert 
 > when the array reaches a certain number of rows.  The error I got is:
 > 
 > Open Client Message:
 > Message number: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (16)
 > Message String: ct_command(): user api layer: external error: This routine 
 > cannot be called while results are pending for a command that has been sent to 
 > the server.
 > 
 > The data I read in is good.
 > I wouldn't think I have to close the DB handle every time I insert
a batch.  

You're not processing all the results correctly. You *must* call
ct_results() in a loop until stops returning CS_SUCCEED.

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