Subject | Re: [firebird-support] Autogenerate template procedures (IBExpert) |
---|---|
Author | Martijn Tonies |
Post date | 2005-05-19T14:51:09Z |
Tim,
based on the primary key.
Database Workbench - part of the "Create SUID Procedures".
Check: http://www.upscene.com/documentation/dbw/tools_suidprocedures.htm
This one is a "Insert/Update Procedure"
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
> Are there features in firebird or IBExpert to simplify common tasks suchas creating a stored procedure to add or update a field in a table.
>name is repeated five times (plus the a few times on the calling side)
> I am getting somewhat bored writing code like this where the same field
>all? This is esentially a procedure adding all data to a row in a table
> CREATE PROCEDURE SP_ITEM_ADD (
> IITEM_ID INTEGER,
> SNAME VARCHAR(50))
> AS
> begin
> INSERT INTO T_ITEMS
> (ITEM_ID, NAME)
> VALUES (:IITEM_ID, :SNAME);
> when sqlcode -803 do --errorcode "no duplicate value"
> UPDATE T_ITEMS
> set name = :SNAME,
> where ITEM_ID = :IITEM_ID;
> End
>
> Are there tools to generate this or is there a better way than writing it
based on the primary key.
>Sure there are tools to do this... Guess which one :-)
Database Workbench - part of the "Create SUID Procedures".
Check: http://www.upscene.com/documentation/dbw/tools_suidprocedures.htm
This one is a "Insert/Update Procedure"
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com