Hi, I was wondering if anyone could help with out with some information about this error type.
Basically I have some simple triggers that respond to insert, update and delete actions on some of our tables.In the trigger code it does an INSERT into another table for auditing purposes. EXAMPLE : CREATE TRIGGER user_insert FOR resourceusers.user AFTER INSERT EXECUTE ( var webappuser char(10);dbuser char(10);currenttime time; currentdate date;aftervalue varchar(2000);webappusercount int; set webappuser=''; select count(*) into :webappusercount from resourceusers.user where active=true; if webappusercount > 0 then begin / select loginname into :webappuser from resourceusers.user where active=true; end; select chr(user_id,10) into :dbuser from domain.show_user_current; set currenttime = time; set currentdate = date; CALL resourceusers.user_state(:NEW.userid,:NEW.passwordlength,:NEW.roleid,:NEW.lo ginname,:NEW.password,:NEW.username,:NEW.active,:aftervalue); INSERT into resourceusers.audit(auditid,time,date,webappuser,dbuser,action,tablename,aft ervalue)values(RESOURCEUSERS.AUDITID_SEQ.NEXTVAL,:currenttime,:currentdate,: webappuser,:dbuser,'insert','user',:aftervalue) ) The call to the stored procedure simply creates a XML representation of the record for auditing purposes ie: there is no sub-transactional functionality in the procedure. Basically I don't know why we are from time to time getting these 3102 errors. Is there some problem with the INSERT statement in the trigger, because as far as I can tell, that is the only sub-transaction that gets initiated?? Do I need to put the INSERT call inside a SUBTRANS BEGIN .....SUBTRANS END block ???? Thanks in advance for any help on this matter. Regards, DAMIEN DALLIMORE - Java Developer [EMAIL PROTECTED] mobile : +64 21 565088 The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
