Local Interbase Server - Stored Procedures ? 
Author Message
 Local Interbase Server - Stored Procedures ?

Does anyone know if / how it is possible to create stored procedures
using Local Interbase ?

I have tried to figure it out from the examples in the book, but
although the code SQL Script says completed without errors there
don't seem to be any procedures in the database

Any help / samples would be greatly appreciated

--
Simon Sheard                                   Tel: +(44) 1484 601000
Reliance Gear Company Ltd.                     Fax: +(44) 1484 601001



Tue, 03 Mar 1998 03:00:00 GMT  
 Local Interbase Server - Stored Procedures ?


Quote:
>Does anyone know if / how it is possible to create stored procedures
>using Local Interbase ?

>I have tried to figure it out from the examples in the book, but
>although the code SQL Script says completed without errors there
>don't seem to be any procedures in the database

>Any help / samples would be greatly appreciated

You can cut and paste the script below into file and then use ISQL
to read in as a script.  You can change the location of the database
my modifying the CREATE DATABASE statement.

After running the script, connect to the newly created database with
ISQL.  To execute the stored procedure, type "EXECUTE PROCEDURE
INSERT_MYTABLE" and click RUN.  This will add a record to MYTABLE
with a unique primary key and return the unique key.

----- start of script ------

CREATE DATABASE "c:\mydb.gdb" PAGE_SIZE 1024
;

CREATE TABLE MYTABLE (UNIQUEKEY INTEGER NOT NULL,
        NAME CHAR(25),
PRIMARY KEY (UNIQUEKEY));

CREATE GENERATOR MYTABLE_UNIQUEKEY;

COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;

CREATE PROCEDURE INSERT_MYTABLE RETURNS (MYTABLE_UNIQUEKEY INTEGER)
AS
begin
 mytable_uniquekey = gen_id(mytable_uniquekey, 1);

 insert into mytable (uniquekey)
  values (:mytable_uniquekey);

 exit;
end
^
SET TERM ; ^
COMMIT WORK ;
SET AUTODDL ON;

----- end of script ------

Rodger                                 (MIME Welcome!)
---------
Rodger B. Zeisler - Everest Software Corporation              
Work: 214.437.7636  Fax: 214.437.7600  Home: 214.517.4884

----------



Fri, 06 Mar 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Local interbase is fast, what about Interbase server?

2. toggling between local interbase and client server interbase

3. SQL Server Extended Stored Procedures

4. Trapping SQL Server stored procedure error from Delphi

5. Q: Delphi 1.0 Client/Server and multirow fetching from Oracle 7.3 Stored Procedures

6. HELP: MS SQL Server and Stored Procedures

7. MS SQL Server 6.0 Extended Stored Procedures

8. Problem calling SQL Server stored procedure

9. SQL Server Extended Stored Procedures

10. D2 and problems with Stored Procedure Component on MS SQL Server

11. Stored procedure and MS-SQL server

12. Stored Procedure And Ms Sql Server

 

 
Powered by phpBB® Forum Software