Subject Execute Block: Need Insert Into to trigger Primary Key generator.
Author

Firebird 2.14,  Delphi 2007, Multi-User App, IBDac components.


I need to insert many multiple rows  ( 200 to 600) in a single event. To avoid network slowing the process, I'm trying Execute Block for the first time (just learned about it).  The code below doesn't work because the Primary Key is null. There is a generator but this doesn't seem to trigger it. Any help will be greatly appreciated.


SQL snippet:


set term ^ ;

EXECUTE BLOCK AS BEGIN

INSERT INTO ACORD_DATA (PK_ID, FK_ID, D_ACORD_FORM_FIELD_NAME, D_ACORD_FORM_FIELD_TYPE, STR_VALUE) VALUES (Default ,972, 'FrmCmplDtA', 'CHAR', '02/26/2018');

INSERT INTO ACORD_DATA (PK_ID, FK_ID, D_ACORD_FORM_FIELD_NAME, D_ACORD_FORM_FIELD_TYPE, STR_VALUE) VALUES (Default ,972, 'ProFullNmA', 'CHAR', 'Waterman Insurance Agency Inc.');

INSERT INTO ACORD_DATA (PK_ID, FK_ID, D_ACORD_FORM_FIELD_NAME, D_ACORD_FORM_FIELD_TYPE, STR_VALUE) VALUES (Default ,972, 'ProAuthReprSigA', 'CHAR', '');

INSERT INTO ACORD_DATA (PK_ID, FK_ID, D_ACORD_FORM_FIELD_NAME, D_ACORD_FORM_FIELD_TYPE, STR_VALUE) VALUES (Default ,972, 'FrmEdIdA', 'CHAR', '');

END^

set term ; ^