Borland®
Shop
Products Downloads Services Support Partners News & Events Company Community
Company

 SQL LINKS DEVELOPER SUPPORT

SEARCH Borland Online/Developer Support

Tech Notes Index


ct_send(): user api layer: external error: This routine cannot 
be called because another command structure has results pending."
Sybase (CTLIB SYBSSC32.DLL) SQL Links Driver, BDE 4.x
"General SQL error.
ct_send(): user api layer: external error: This routine cannot 
be called because another command structure has results pending."
Problem:
I WISH TO RETURN RESULT SETS FROM MULTIPLE PROCS OR 
OPEN TABLES/TQUERIES AFTER RETURNING RESULTS FROM A 
STORED PROC.
Solution:
USE A TQUERY TO "OPEN" THE STOREDPROC 
(For additional info please see the topic on Sybase in the 
BDE32.HLP file by using the help file Index tab to search 
for SYBASE)

Delphi Example:
Add "BDE" to your unit's uses clause
Button Click procedure to open results from a 
Tquery ("exec storedproc"):
procedure TForm1.Button2Click(Sender: TObject);
begin
query1.prepare;
dbisetprop(hdbiobj(query1.StmtHandle),stmtEXECASCURSOR,1);
query1.open;
In this example:
the StoredProc name is LINEITEM_RSLT:
CREATE PROCEDURE LINEITEM_RSLT AS
(
SELECT * FROM lineitem
)

Tquery1 sql strings is 
exec LINEITEM_RSLT

PUB
SYB LINK TECH
QW, BC
8.6.97


 
Site Map Search Contact