Subject Re: [IBO] Selectable stored procedures and IBO
Author crazymenconnected
--- In IBObjects@yahoogroups.com, "crazymenconnected"
And again another mistake! The last section of the previous post is
not EditSQL but DeleteSQL. The correct code is:

DeleteSQL Property code:
"EXECUTE PROCEDURE KM_DELETE_PLAYER(:ID)"

SSP Code:
CREATE PROCEDURE KM_DELETE_PLAYER(
IN_PLAYER_ID INTEGER)
AS
BEGIN
/* Determine if the user is an administrator! */
IF (EXISTS(SELECT * FROM players WHERE ID = :IN_PLAYER_ID AND
ADMINISTRATOR = 1)) THEN
EXCEPTION exc_not_delete_admin;

/* Delete data from table player_colonies */
DELETE FROM player_colonies WHERE PLAYER_ID = :IN_PLAYER_ID;
/* Delete data from table player_evolutions */
DELETE FROM player_evolutions WHERE PLAYER_ID = :IN_PLAYER_ID;
/* Delete data from table players */
DELETE FROM players WHERE ID = :IN_PLAYER_ID;
END


(Doing several things at the same time, some of them must go
wrong!) :-)
Luis Semedo Duarte