SQL server with sequence's
Posted: Wed 28 Dec 2016 10:55
Hello,
i am using unidac 6.3.13. I have Sql server 2012 where is use for id values sequence.
The table is generated like this:
ALTER TABLE [dbo].[l_matriksi] ADD CONSTRAINT [DF_L_MATRIKSI_id_matriksa] DEFAULT (NEXT VALUE FOR [id_matriksa_seq]) FOR [id_matriksa].
Table is l_matriksi, key field is id_matriksa, and sequence is id_matriksa_seq.
When i use insert and post i cant get back key field value?
uniquery1.insert;
uniquery.Post;
uniquery.fieldbyname('id_matriksa').AsInteger <- this is empty
Records are inserted ok.
Is there any settings i should use? In order that this insert works i only set RequiredFields := false;
i am using unidac 6.3.13. I have Sql server 2012 where is use for id values sequence.
The table is generated like this:
ALTER TABLE [dbo].[l_matriksi] ADD CONSTRAINT [DF_L_MATRIKSI_id_matriksa] DEFAULT (NEXT VALUE FOR [id_matriksa_seq]) FOR [id_matriksa].
Table is l_matriksi, key field is id_matriksa, and sequence is id_matriksa_seq.
When i use insert and post i cant get back key field value?
uniquery1.insert;
uniquery.Post;
uniquery.fieldbyname('id_matriksa').AsInteger <- this is empty
Records are inserted ok.
Is there any settings i should use? In order that this insert works i only set RequiredFields := false;