Subject RE: [firebird-support] ADD GRANT TO PROCEDURE
Author Nick
/* ------------------------------------------------------------ */
CREATE PROCEDURE ADD_NEW_USER (
CID CHAR (8) CHARACTER SET WIN1251,
CNAME CHAR (30) CHARACTER SET WIN1251,
CPHONE CHAR (10) CHARACTER SET WIN1251,
CEMAIL CHAR (30) CHARACTER SET WIN1251,
CPSW CHAR (8) CHARACTER SET WIN1251)
AS
declare variable mystr Varchar(99);

BEGIN
INSERT INTO TBLCUST (CID, CNAME,CPHONE,CEMAIL,CPSW) VALUES (:CID,
:CNAME,:CPHONE,:CEMAIL,:CPSW);
mystr = 'GRANT SELECT, UPDATE ON TBLCUST TO ' || CID;
execute statement mystr;
END




--
Nick
-----We Solve your Computer Problems---
Panther, Ingres, UNIX, Interbase, Firebird - Available Shortly

-----Original Message-----
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of boybsma
Sent: 13 October 2005 13:42
To: firebird-support@yahoogroups.com
Subject: [firebird-support] ADD GRANT TO PROCEDURE


I use this PROCEDURE to add new user.
I like to add GRANT statment to this PROCEDURE. (GRANT SELECT,
UPDATE ON TBLCUST TO USER TBLCUST.CID;)
How can I do? I am using firebird 1.5.3

/* ------------------------------------------------------------ */
CREATE PROCEDURE ADD_NEW_USER (
CID CHAR (8) CHARACTER SET WIN1251,
CNAME CHAR (30) CHARACTER SET WIN1251,
CPHONE CHAR (10) CHARACTER SET WIN1251,
CEMAIL CHAR (30) CHARACTER SET WIN1251,
CPSW CHAR (8) CHARACTER SET WIN1251)
AS

BEGIN
BEGIN
INSERT INTO TBLCUST (CID, CNAME,CPHONE,CEMAIL,CPSW) VALUES
(:CID, :CNAME,:CPHONE,:CEMAIL,:CPSW);
END
SUSPEND;
END
/* ------------------------------------------------------------ */








++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://firebird.sourceforge.net and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at http://www.ibphoenix.com

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




_____

YAHOO! GROUPS LINKS



* Visit your group "firebird-support
<http://groups.yahoo.com/group/firebird-support> " on the web.


* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>


* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


_____




[Non-text portions of this message have been removed]