Zprocessor doesnt exec CREATE TRIGGER AND ZQUERY TO
Posted: 25.05.2010, 00:13
Why cant i exec this on zsqlprocessor or zquery
But i dont want to add sql.clear ; sql.sql := text;
parcial want to exec all on same string ???
any goodc
Better yet how can i exec create table create procedure and every thing on same tstring ?????
It it possible.
Execdirect solve the problem ???????
Damn this is a Terror movie .. .. .
/* Begin : Triggers Definition */
SET TERM ^ ;
CREATE TRIGGER TRI_GRUPOS FOR GRUPOS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.GR_ID IS NULL) OR (NEW.GR_ID = 0)) THEN BEGIN NEW.GR_ID =GEN_ID(GEN_GRUPOSID ,1);END END ^
CREATE TRIGGER TRI_GRUPOSCOLABORDORES FOR GRUPOSCOLABORDORES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.GC_ID IS NULL) OR (NEW.GC_ID = 0)) THEN BEGIN NEW.GC_ID =GEN_ID(GEN_GRUPOSCOLABORDORESID ,1);END END ^
CREATE TRIGGER TRI_FORMAPAGAMENTO FOR FORMAPAGAMENTO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.FP_ID IS NULL) OR (NEW.FP_ID = 0)) THEN BEGIN NEW.FP_ID =GEN_ID(GEN_FORMAPAGAMENTOID ,1);END END ^
CREATE TRIGGER TRI_SERVICOSCLIENTES FOR SERVICOSCLIENTES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.SC_ID IS NULL) OR (NEW.SC_ID = 0)) THEN BEGIN NEW.SC_ID =GEN_ID(GEN_SERVICOSCLIENTESID ,1);END END ^
CREATE TRIGGER TRI_SOLICITACOESCLICOL FOR SOLICITACOESCLICOL ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.SCC_ID IS NULL) OR (NEW.SCC_ID = 0)) THEN BEGIN NEW.SCC_ID =GEN_ID(GEN_SOLICITACOESCLICOLID ,1);END END ^
CREATE TRIGGER TRI_ATTACHFILES FOR ATTACHFILES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.AF_ID IS NULL) OR (NEW.AF_ID = 0)) THEN BEGIN NEW.AF_ID =GEN_ID(GEN_ATTACHFILESID ,1);END END ^
CREATE TRIGGER TRI_SERVICOSCONTRATADOS FOR SERVICOSCONTRATADOS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.SC_ID IS NULL) OR (NEW.SC_ID = 0)) THEN BEGIN NEW.SC_ID =GEN_ID(GEN_SERVICOSCONTRATADOSID ,1);END END ^
CREATE TRIGGER TRI_PERIODICIDADESERVICOS FOR PERIODICIDADESERVICOS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.PS_ID IS NULL) OR (NEW.PS_ID = 0)) THEN BEGIN NEW.PS_ID =GEN_ID(GEN_PERIODICIDADESERVICOSID,1);END END ^
CREATE TRIGGER TRI_TIPOSERVICO FOR TIPOSERVICO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.TS_ID IS NULL) OR (NEW.TS_ID = 0)) THEN BEGIN NEW.TS_ID =GEN_ID(GEN_TIPOSERVICOID ,1);END END ^
CREATE TRIGGER TRI_GENEROSERVICO FOR GENEROSERVICO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.GS_ID IS NULL) OR (NEW.GS_ID = 0)) THEN BEGIN NEW.GS_ID =GEN_ID(GEN_GENEROSERVICOID ,1);END END ^
CREATE TRIGGER TRI_RESULTADO FOR RESULTADO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.R_ID IS NULL) OR (NEW.R_ID = 0)) THEN BEGIN NEW.R_ID =GEN_ID(GEN_RESULTADOID ,1);END END ^
CREATE TRIGGER TRI_RESULTADO FOR ACCOESEXECUTADAS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.AE_ID IS NULL) OR (NEW.AE_ID = 0)) THEN BEGIN NEW.AE_ID =GEN_ID(GEN_ACCOESEXECUTADASID ,1);END END ^
CREATE TRIGGER TRI_TIPOSOLICITACOESINFO FOR TIPOSOLICITACOESINFO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.TSI_ID IS NULL) OR (NEW.TSI_ID = 0)) THEN BEGIN NEW.TSI_ID =GEN_ID(GEN_TIPOSOLICITACOESINFOID ,1);END END ^
COMMIT WORK ^
SET TERM ;^
/* End : Triggers Definition */
But i dont want to add sql.clear ; sql.sql := text;
parcial want to exec all on same string ???
any goodc
Better yet how can i exec create table create procedure and every thing on same tstring ?????
It it possible.
Execdirect solve the problem ???????
Damn this is a Terror movie .. .. .
/* Begin : Triggers Definition */
SET TERM ^ ;
CREATE TRIGGER TRI_GRUPOS FOR GRUPOS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.GR_ID IS NULL) OR (NEW.GR_ID = 0)) THEN BEGIN NEW.GR_ID =GEN_ID(GEN_GRUPOSID ,1);END END ^
CREATE TRIGGER TRI_GRUPOSCOLABORDORES FOR GRUPOSCOLABORDORES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.GC_ID IS NULL) OR (NEW.GC_ID = 0)) THEN BEGIN NEW.GC_ID =GEN_ID(GEN_GRUPOSCOLABORDORESID ,1);END END ^
CREATE TRIGGER TRI_FORMAPAGAMENTO FOR FORMAPAGAMENTO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.FP_ID IS NULL) OR (NEW.FP_ID = 0)) THEN BEGIN NEW.FP_ID =GEN_ID(GEN_FORMAPAGAMENTOID ,1);END END ^
CREATE TRIGGER TRI_SERVICOSCLIENTES FOR SERVICOSCLIENTES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.SC_ID IS NULL) OR (NEW.SC_ID = 0)) THEN BEGIN NEW.SC_ID =GEN_ID(GEN_SERVICOSCLIENTESID ,1);END END ^
CREATE TRIGGER TRI_SOLICITACOESCLICOL FOR SOLICITACOESCLICOL ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.SCC_ID IS NULL) OR (NEW.SCC_ID = 0)) THEN BEGIN NEW.SCC_ID =GEN_ID(GEN_SOLICITACOESCLICOLID ,1);END END ^
CREATE TRIGGER TRI_ATTACHFILES FOR ATTACHFILES ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.AF_ID IS NULL) OR (NEW.AF_ID = 0)) THEN BEGIN NEW.AF_ID =GEN_ID(GEN_ATTACHFILESID ,1);END END ^
CREATE TRIGGER TRI_SERVICOSCONTRATADOS FOR SERVICOSCONTRATADOS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.SC_ID IS NULL) OR (NEW.SC_ID = 0)) THEN BEGIN NEW.SC_ID =GEN_ID(GEN_SERVICOSCONTRATADOSID ,1);END END ^
CREATE TRIGGER TRI_PERIODICIDADESERVICOS FOR PERIODICIDADESERVICOS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.PS_ID IS NULL) OR (NEW.PS_ID = 0)) THEN BEGIN NEW.PS_ID =GEN_ID(GEN_PERIODICIDADESERVICOSID,1);END END ^
CREATE TRIGGER TRI_TIPOSERVICO FOR TIPOSERVICO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.TS_ID IS NULL) OR (NEW.TS_ID = 0)) THEN BEGIN NEW.TS_ID =GEN_ID(GEN_TIPOSERVICOID ,1);END END ^
CREATE TRIGGER TRI_GENEROSERVICO FOR GENEROSERVICO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.GS_ID IS NULL) OR (NEW.GS_ID = 0)) THEN BEGIN NEW.GS_ID =GEN_ID(GEN_GENEROSERVICOID ,1);END END ^
CREATE TRIGGER TRI_RESULTADO FOR RESULTADO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.R_ID IS NULL) OR (NEW.R_ID = 0)) THEN BEGIN NEW.R_ID =GEN_ID(GEN_RESULTADOID ,1);END END ^
CREATE TRIGGER TRI_RESULTADO FOR ACCOESEXECUTADAS ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.AE_ID IS NULL) OR (NEW.AE_ID = 0)) THEN BEGIN NEW.AE_ID =GEN_ID(GEN_ACCOESEXECUTADASID ,1);END END ^
CREATE TRIGGER TRI_TIPOSOLICITACOESINFO FOR TIPOSOLICITACOESINFO ACTIVE BEFORE INSERT POSITION 0 AS BEGIN IF ((NEW.TSI_ID IS NULL) OR (NEW.TSI_ID = 0)) THEN BEGIN NEW.TSI_ID =GEN_ID(GEN_TIPOSOLICITACOESINFOID ,1);END END ^
COMMIT WORK ^
SET TERM ;^
/* End : Triggers Definition */