TSqlQuery with Firebird 3 "generated as identity" columns? lazarus / 16-Databases ---------------------------------------------------------------------- dsiders · 2017-12-26 00:02 I been trying to get TSqlQuery in Lazarus 1.8 to work with Firebird 3 tables that contain "generated by default as identity" columns. InsertSql statements always raise an exception about the missing value for the required ID field. Editing the FieldDef to make it not required and read-only hasn't helped. Does this FB3 feature work in sqldb for 1.8? ---------------------------------------------------------------------- sash · 2017-12-26 14:39 Well, I don't know what is a current state of development, but you could use a workaround: for your SQLQuery.Sequence set FieldName and SequenceName accordingly. SequenceName should be set to the internal generator name for your field: something like RDB$123. Exact name could be retrieved with query: Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SELECT rdb$generator_name FROM rdb$relation_fields WHERE rdb$relation_name = 'YOUR_TABLE' AND rdb$field_name = 'YOUR_ID_FIELD'  Please take note, that internal generator name may differ on another database instance. ---------------------------------------------------------------------- dsiders · 2017-12-26 16:59 Quote from: sash on December 26, 2017, 03:39:22 pmWell, I don't know what is a current state of development, but you could use a workaround: for your SQLQuery.Sequence set FieldName and SequenceName accordingly. SequenceName should be set to the internal generator name for your field: something like RDB$123. Exact name could be retrieved with query: Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SELECT rdb$generator_name FROM rdb$relation_fields WHERE rdb$relation_name = 'YOUR_TABLE' AND rdb$field_name = 'YOUR_ID_FIELD'  Please take note, that internal generator name may differ on another database instance. Thanks sash. I'm getting ready to try your suggestion. But it sure would be nice if the fielddefs had an ftIdentity data type that triggered this automatically. Breaking changes... ---------------------------------------------------------------------- talorigomat · 2017-12-27 12:07 Lets say your identity field is named widgetid then issuing the following command before issuing the applyupdates command should resolve the problem Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SQLQuery1.FieldByName('widgetid').Required:=False