Hi,
I am porting my db from Sqlite to IbLite
I have some problems.
Normaly if I define auto increment fields in sqlite Firedac can Understand that and add ServerAutoinc options.
But In interbase it is not working.
Noww I have a error Field Id must have value in interbase.
But it should add by generator and transaction.
Is there any example about that
Which is the best settings for auto increment fields for firedac and interbase
my interbase table is
CREATE TABLE TEST (
TEST_ID DOM_INTEGER NOT NULL,
ID DOM_INTEGER DEFAULT NULL,
"NAME" DOM_TWIDEMEMOFIELD,
SHORTNAME DOM_TWIDEMEMOFIELD,
VARIABLES DOM_TWIDEMEMOFIELD,
BPSENUM DOM_INTEGER);
ALTER TABLE TEST ADD PRIMARY KEY (TEST_ID) USING INDEX RDB$PRIMARY31;
SET TERM ^ ;
CREATE TRIGGER BI_TEST_TEST_ID FOR TEST
ACTIVE BEFORE
INSERT
POSITION 0
AS
BEGIN
IF (NEW.TEST_ID IS NULL) THEN
NEW.TEST_ID = GEN_ID(TEST_TEST_ID_GEN, 1);
END^
SET TERM ; ^
Connect with Us