On 02/27/12 18:19, Björn Reimer wrote: > Hello, > > should a trigger like the following on fb 2.5.(2 snapshot) fire when > attaching via service api? It does not in my tests. > > > SET TERM ^ ; > > > CREATE OR ALTER TRIGGER DB_BI0 > ACTIVE ON CONNECT POSITION 0 > AS > begin > if (upper(current_role) = 'NONE') then > EXCEPTION PARAMINVALID 'Please use a role...'; > end > ^ > > > SET TERM ; ^ > > > Why? > > I can imagine that there might be problems because of the context (No > transaction ...) but such tests like above should work, don't they? >
Works for me: fbs2 bin # ./gbak -z -se service_mgr -b employee e.bak gbak:gbak version LI-V2.5.2.26422 Firebird 2.5 gbak: ERROR:exception 8 gbak: ERROR: PARAMINVALID gbak: ERROR: Please use a role... gbak: ERROR: At trigger 'DB_BI0' line: 5, col: 37 gbak:Exiting before completion due to errors fbs2 bin # ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
