Hi everyone,
I am experiencing problems when trying to add a trigger to a table.
After adding the trigger in the designer and saving, I get Exception of type 'System.OutOfMemoryException' was thrown. When I close the designer and refresh the tree view of my database file, the trigger shows up -- however, when I try to open the table in designing mode, I face the same error message again.
Same happens when I add the trigger using the appropriate SQL command.
OS: Windows Vista Home Premium 32bit (German / German region settings)
Dev: Microsoft Visual Studio 2008+SP1, .sln consists of the database project and a VS.php project
This is the CREATE TABLE command:
CREATE TABLE "grades" (
[gID] integer PRIMARY KEY AUTOINCREMENT NOT NULL,
[dated] date NOT NULL,
[class] varchar(3) NOT NULL,
[grade] integer NOT NULL,
[autoDate] tinyint NOT NULL DEFAULT 0
);
And this is the CREATE TRIGGER command:
CREATE TRIGGER trgInsertGrade AFTER INSERT ON grades FOR EACH ROW WHEN new.dated == '0000-00-00'
BEGIN
UPDATE grades SET dated = CURRENT_DATE, autoDate = 1 WHERE gID = new.gID;
END;
I also tried to open a table with triggers which was completely set up using the sqlite3 command line tool with the same results; so the problem seems to be somewhere in the process that reads the table information and provides the design interface -- Don't know much about all these things, just guessing.
Any help would be appreciated!
Thanks in advance,
Paul