Using MSSQL via FireDAC, I have a situation where I need to insert a record into a table and force the PK (which is an IDENTITY field) to a fixed value.
If I was using standard T-SQL statements for this then I’d simply use SET IDENTITY_INSERT Table ON and then supply the relevant value.
Is there any way to achieve this via DA when using a TDAMemDataTable and just ApplyUpdates?
you need to change server schema too because it has special processing for AutoInc fields.
If you need both behaviors, I can recommend to create a replica of table in schema which will use Integer instead of Autoinc, so you can just change logical name and field type (or re-load table schema) on client side for changing behavior.