Subject | FW: newbie ?s - trigger problem revisited |
---|---|
Author | jon-david schlough |
Post date | 2002-02-19T18:17:35Z |
SORRY ABOUT THAT! I accidently sent this unfinished b4 - here's the copy
including the trigger code...
-----Original Message-----
From: jon-david schlough [mailto:jdschlough@...]
Sent: Tuesday, February 19, 2002 12:12 PM
To: ibsupport
Subject: newbie ?s - trigger problem revisited
I'm using WI-T6.2.679 Firebird Release Candidate 2 on Win2k with Access as a
client. Not using the client just yet though - working with Firebird using
Interbase Workbench.
I created a test database newbie.gdb with 2 tables...
here are the db properties, I'm including them since when I viewed them I
noticed that Page Buffers were set to 0 and the minimum is 50 - so I set it
to 50.
Database: boognish:C:\Firebird\data\newbie.gdb
Character Set: NONE
Version: WI-T6.2.679 Firebird Release Candidate 2
ODS Version: 10.0
Page Size: 4096
Allocated Pages: 154
Size in Pages: 154
Page Buffers: 50
SQL Dialect: 3
Sweep Interval: 20000
Forced Writes: enabled
Read Only: disabled
the DLL for the tables:
RECREATE TABLE EMP_TRANSACTION
(
TID INTEGER NOT NULL,
ID INTEGER,
F_NAME VARCHAR( 20) CHARACTER SET NONE COLLATE NONE,
L_NAME VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
TITLE VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
HIRE_DATE VARCHAR( 10) CHARACTER SET NONE COLLATE NONE
);
COMMIT;
RECREATE TABLE EMPLOYEE
(
ID INTEGER NOT NULL,
F_NAME VARCHAR( 20) CHARACTER SET NONE COLLATE NONE,
L_NAME VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
TITLE VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
HIRE_DATE VARCHAR( 10) CHARACTER SET NONE COLLATE NONE
);
COMMIT;
Trigger: PRODUCT_INSERT
CREATE TRIGGER PRODUCT INSERT
ACTIVE
AFTER INSERT
AS
BEGIN
INSERT INTO TRANSACTION1
( TID, TRANS_TYPE, EDITOR)
VALUES
('1', 'insert', 'dude');
END;
I added the create, active, after insert, and AS since in workbench they are
not coded into the editor but set as options.
Now, I know I need to make the TID and ID field PKs, which I am doing since
the dependency was causing errors when my generator didn't work - so I
removed them just for the testing.
I'm trying to figure out if my code is erroneous or if I have bigger,
configuration related problems. Or am I just going about this in a
fundamentally wrong way...
thanks very much!!
jon-david
including the trigger code...
-----Original Message-----
From: jon-david schlough [mailto:jdschlough@...]
Sent: Tuesday, February 19, 2002 12:12 PM
To: ibsupport
Subject: newbie ?s - trigger problem revisited
I'm using WI-T6.2.679 Firebird Release Candidate 2 on Win2k with Access as a
client. Not using the client just yet though - working with Firebird using
Interbase Workbench.
I created a test database newbie.gdb with 2 tables...
here are the db properties, I'm including them since when I viewed them I
noticed that Page Buffers were set to 0 and the minimum is 50 - so I set it
to 50.
Database: boognish:C:\Firebird\data\newbie.gdb
Character Set: NONE
Version: WI-T6.2.679 Firebird Release Candidate 2
ODS Version: 10.0
Page Size: 4096
Allocated Pages: 154
Size in Pages: 154
Page Buffers: 50
SQL Dialect: 3
Sweep Interval: 20000
Forced Writes: enabled
Read Only: disabled
the DLL for the tables:
RECREATE TABLE EMP_TRANSACTION
(
TID INTEGER NOT NULL,
ID INTEGER,
F_NAME VARCHAR( 20) CHARACTER SET NONE COLLATE NONE,
L_NAME VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
TITLE VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
HIRE_DATE VARCHAR( 10) CHARACTER SET NONE COLLATE NONE
);
COMMIT;
RECREATE TABLE EMPLOYEE
(
ID INTEGER NOT NULL,
F_NAME VARCHAR( 20) CHARACTER SET NONE COLLATE NONE,
L_NAME VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
TITLE VARCHAR( 40) CHARACTER SET NONE COLLATE NONE,
HIRE_DATE VARCHAR( 10) CHARACTER SET NONE COLLATE NONE
);
COMMIT;
Trigger: PRODUCT_INSERT
CREATE TRIGGER PRODUCT INSERT
ACTIVE
AFTER INSERT
AS
BEGIN
INSERT INTO TRANSACTION1
( TID, TRANS_TYPE, EDITOR)
VALUES
('1', 'insert', 'dude');
END;
I added the create, active, after insert, and AS since in workbench they are
not coded into the editor but set as options.
Now, I know I need to make the TID and ID field PKs, which I am doing since
the dependency was causing errors when my generator didn't work - so I
removed them just for the testing.
I'm trying to figure out if my code is erroneous or if I have bigger,
configuration related problems. Or am I just going about this in a
fundamentally wrong way...
thanks very much!!
jon-david