SQL CREATE TRIGGER command - SQLCODE: <-300>:
Hello, I am running into a little problem.
I am trying to create a Cache Trigger on a FACS table using the SQL CREATE TRIGGER command but I am getting the message [SQLCODE: <-300>:<DDL not allowed on this table definition>].
I am not creating a persistent class but using the SQL CREATE TRIGGER command.
Please advise.
thanks.
Comments
to edit a table by DDL the corresponding class hat to be DDL allowed.
This is new to me...How do I alter the persistent table class definition to include [DdlAllowed]?
Just as an example:
SQL Table Name: Dbtr_Clnt_Generl_Inf
Dbtr Clnt Generl Inf
Class User.DbtrClntGenerlInf Extends %Persistent [DdlAllowed]
{
}In studio you open the class and click the class attribute in the inspector
.png)
First guys, I appreciate the help/guidance.
Yes, I understand about the syntax DdlAllowed.
The Studio is missing piece to the puzzle.
I am not familiar with Studio? Are we talking about Visual Studio or an IDE specific to Cache?
Any and all info would be helpful.
Thanks
Studio is an integrated part of Caché, Ensemble, IRIS, ... and part of any installation kit for Windows
https://docs.intersystems.com/iris20201/csp/docbook/DocBook.UI.Page.cls?KEY=GSTD
Thanks Robert.
This was very helpful.
Update:
I was able to successfully attach the trigger to the cache table Dbtr_Clnt_Generl_Inf but when the user changes any of the fields the trigger is monitoring the trigger does not appear to fire and the add entry into the log table.
The same trigger works for the test cache tables I created but does not work when attached to the production table within Cache.
Is there something else that needs to be done.? The only difference is the trigger is attached to the live production table.
