문제

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