Login   Register  
PHP Classes
elePHPant
Icontem

File: buglogtable.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Fasani  >  Interbase with error logging  >  buglogtable.sql  >  Download  
File: buglogtable.sql
Role: Auxiliary data
Content type: text/plain
Description: Sql file for the creation of the BUGLOG table.
Class: Interbase with error logging
Interbase access wrapper. Conn/Query errors logged
Author: By
Last change:
Date: 9 years ago
Size: 793 bytes
 

Contents

Class file image Download
/* Table: BUGLOG */

CREATE TABLE BUGLOG (
    BUGIDE INTEGER NOT NULL,
    BUGURI VARCHAR (60) CHARACTER SET NONE COLLATE NONE,
    BUGMSG VARCHAR (300) CHARACTER SET NONE COLLATE NONE,
    BUGQRY VARCHAR (500) CHARACTER SET NONE COLLATE NONE,
    BUGSTA TIMESTAMP);



/* Primary keys definition */

ALTER TABLE BUGLOG ADD CONSTRAINT PK_BUGLOG PRIMARY KEY (BUGIDE);

SET TERM ^ ;

/* Let's create a Generator variable to store the autoincremental IDE */
CREATE GENERATOR "BUGLOG_BUGIDE_GEN";

/* Triggers definition */


/* Trigger: AI_BUGLOG_BUGIDE :AUTO_INCREMENT IDE */
CREATE TRIGGER AI_BUGLOG_BUGIDE FOR BUGLOG ACTIVE
BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.BUGIDE IS NULL) THEN
      NEW.BUGIDE = GEN_ID(BUGLOG_BUGIDE_GEN, 1);
END
^


SET TERM ; ^