質問

I want check if two fields have the same type at runtime. I have the field name as a string. I want know what is the type of field by its name. I use Delphi xe6 and FireDAC. I don't understand how to use TFDMetaInfoQuery for this scope.

役に立ちましたか?

解決

Rather than using a TFDMetaInfoQuery, it is much easier if you simply use the metadata exposed by the TFields of your FireDAC datasets. After opening a dataset use the Fields property or the FieldByName or FindField method to reference the field that you are interested in, and then use the DataType, and other properties of the returned TField to inspect the metadata.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top