zaikay 0 Posted July 1, 2024 asynchronous query execution loses field type errors object FDQuery1: TFDQuery AfterOpen = FDQuery1AfterOpen OnPostError = FDQuery1PostError OnReconcileError = FDQuery1ReconcileError Connection = FDConnection1 ResourceOptions.AssignedValues = [rvCmdExecMode] ResourceOptions.CmdExecMode = amAsync OnError = FDQuery1Error OnExecuteError = FDQuery1ExecuteError SQL.Strings = ( 'select '#39'qwerty'#39' as AnotherType') Left = 128 Top = 96 object FDQuery1AnotherType: TIntegerField FieldName = 'AnotherType' Origin = 'AnotherType' ReadOnly = True Required = True end end ///// FDQuery1.Open; // this is where the error gets lost Новая папка (34).zip Share this post Link to post
Die Holländer 82 Posted July 1, 2024 Isn't your statement invalid for your case? select 'qwerty' as AnotherType This means: give the output of the field from the sql the name "AnotherType" It seems you expect a kind of casting procedure from text to integer.. Share this post Link to post
zaikay 0 Posted July 1, 2024 (edited) the error is lost I need to process it in the example I showed one of the ways to handle such an error, but I want to handle it in a standard way in an event I want this to be fixed in the embarcadero studio Edited July 1, 2024 by zaikay Share this post Link to post