How to create Auto Incremental Fields in RAD Server with InterBase, FireDAC and TEMSDataSetResource

One key feature when asking a remote server to add a record is to get the new record ID value returned. Thankfully this is easily achieved with InterBase and FireDAC via RAD Server with TEMSDataSetResource

InterBase has a concept of Generators. These provide a unique sequential integer value that can be used to provide a primary key field value. You can create up to 32,767 Generators in an InterBase database, but typically you would create one for the database or create and name one for use per table.

FireDAC Query UpdateOptions AutoInc

Part of the FireDAC framework is the ability to treat database fields as Auto-Incremental Fields. For Databases that do not have an AutoIncremental field data type, you can set the UpdateOptions properties to define the Generator and key fields.