covte96>sqlite3 plus_out.smatdb .schema
CREATE TABLE smat_info (Version INTEGER, ECD VARCHAR, WriteMode INTEGER, SearchMode INTEGER );
CREATE TABLE smat_msgs (MessageContent BLOB,DataLen INTEGER,DestConn VARCHAR,OrigDestConn VARCHAR,DataFmt VARCHAR,SepChars VARCHAR,DriverCtl VARCHAR,UserData VARCHAR,MidDomain INTEGER,MidHub INTEGER,MidNum INTEGER,SrcMidDomain INTEGER,SrcMidHub INTEGER,SrcMidNum INTEGER,Type VARCHAR,SourceConn VARCHAR,OrigSourceConn VARCHAR,Time INTEGER,Priority INTEGER,SaveContext VARCHAR,Flags INTEGER,State INTEGER,GroupMidDomain INTEGER,GroupMidHub INTEGER,GroupMidNum INTEGER,XltThread VARCHAR,Retries INTEGER,SkipXlt INTEGER,UseRecoverDB INTEGER,GroupID INTEGER,TimeIn INTEGER,TimeXlt INTEGER,TimeOut INTEGER,TimeQCur INTEGER,TimeQTot INTEGER,TimeRec INTEGER,TimeStor INTEGER,TimeArc INTEGER,DBTable VARCHAR,Flags_Resent INTEGER,Flags_Trace INTEGER,ErrorString VARCHAR);
CREATE TRIGGER check_smat_info BEFORE INSERT ON smat_info WHEN 1 <= (select count(*) from smat_info) BEGIN SELECT CASE WHEN (1) THEN RAISE (ABORT, "Attempt to insert in smat_info when already populated") END; END;
covte96>