![]() |
|||||||||||||||||
|
|
|||||||||||||||||
|
|
|||||||||
|
Company
|
SQL LINKS DEVELOPER SUPPORT
SEARCH Borland Online/Developer Support
2 simple oracle stored procs: Proc 1) In Oracle's SQL Plus program you would do the following to create, and execute the Oracle stored proc: (Notice the distinction and difference between Oracle PL/SQL statements issued in Oracle's SQL Plus vs. sql PASSTHROUGH statements) SQL> CREATE OR REPLACE PROCEDURE XYZ (X IN NUMBER, C IN VARCHAR2) 2 AS 3 BEGIN 4 UPDATE DELPHI1.CLIENT 5 SET FLD2 = C 6 WHERE FLD1=X; 7 END XYZ; Procedure created. SQL> EXECUTE XYZ(2,'efg'); PL/SQL procedure successfully completed. SQL> COMMIT; Commit complete. Using a sql PASSTHROUGH statement via the BDE you would execute the Oracle stored proc by entering the following either into the TQuery or the DBD SQL editor: BEGIN XYZ(2,'efg); END; Proc 2) create procedure xyz (x out varchar2) as begin x:='abcde'; end xyz; execute the proc via sqlplus: sql>variable x varchar2(20); sql>execute xyz(:x); sql>print x PUB ORA ANY TECH BC, SW
|
|
|
|
|||||
| Made in Borland® Copyright© 1994-2003 Borland Software Corporation. All rights reserved. Report Piracy, Legal Notices, Privacy Policy Last Modified Monday, 26-Mar-2001 16:27:06 PST |
|||||