Question craig jackson · Jul 12, 2020

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

craig jackson  Jul 12, 2020 to Robert Cemper

This is new to me...How do I alter the persistent table class definition to include [DdlAllowed]?

Just as an example:

persistent class User.DbtrClntGenerlInf extends %Persistent

SQL Table Name: Dbtr_Clnt_Generl_Inf

Dbtr Clnt Generl Inf

0
Eduard Lebedyuk  Jul 12, 2020 to craig jackson
Class User.DbtrClntGenerlInf Extends %Persistent [DdlAllowed]
{
}
0
Robert Cemper  Jul 12, 2020 to craig jackson

In studio you open the class and click the class attribute in the inspector

0
craig jackson  Jul 12, 2020 to Robert Cemper

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

0
craig jackson  Jul 12, 2020 to Robert Cemper

Thanks Robert.

This was very helpful.

0
craig jackson  Jul 15, 2020 to craig jackson

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.

0