Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Problems using ct_command()
Date: Mar 19 2001 9:00PM
Trond Straume writes:
> 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?
You need to call ct_results() in a loop until it stops returning
CS_SUCCEED, and you need to fetch all the results (or call
ct_cancel()) for all fetchable results.
I suggest looking at some of the sample code, and reading the Sybase
Michael Peppler - Data Migrations Inc. - firstname.lastname@example.org
http://www.mbay.net/~mpeppler - email@example.com
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: firstname.lastname@example.org