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

 SQL LINKS DEVELOPER SUPPORT

SEARCH Borland Online/Developer Support

Tech Notes Index


BDE/SQL LINKS 4.0 for ORACLE STORED PROCEDURE RESULT SETS
============================================
Test Oracle package, package body and stored procedure used to 
return a cursor and data to the client app:
Examples:

create or replace package test_sp10_pack is
  type rctl is ref cursor return CUSTOMER%rowtype;
  procedure test_sp10_pack_sp ( rc1 in out rctl );
end ;

create or replace package body test_sp10_pack as
  procedure test_sp10_pack_sp ( rc1 in out rctl )
  as begin
    open rc1 for select * from CUSTOMER ;
  end;
end;

create or replace procedure test_sp10 ( rc1 in out test_sp10_pack.rctl) as
  begin
    open rc1 for select * from CUSTOMER;
end;


Delphi/BDE StoredProc:
Add TStoredProc-
	NAME		'test_sp10'
Use params editor to ADD the parameter 'rc1'-
	Parameter type	INPUT/OUTPUT 
	Data type	CURSOR


============================================
ERRORS:
============================================

Delphi StoredProc cursor parameter type must be specified as
INPUT/OUTPUT.
 
If the StoredProc's cursor parameter is set to OUTPUT then an error
similar to the following will come up when the StoredProc is
opened:


Project myproj.exe raised exception class EDBEngineError with message
'General SQL error.
ORA-01001: invalid cusrsor
ORA-06512: at "DELPHI1.TEST_SP10", line 3
ORA-06512: at line1' Process stopped. Use Step or Run to continue.


PUB
ORA LINK TECH ERROR
BC
4.16.97


 
Site Map Search Contact