Jump to content
Sign in to follow this  
zaikay

does not error handler - [FireDAC.Comp.Client CheckFieldCompatibility]

Recommended Posts

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

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..

 

image.png.57aa7568e36286c379f3ac7168d50554.png

 

Share this post


Link to post
Posted (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 by zaikay

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×