Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
2 posts • Page 1 of 1
When in VirtualQuery I use a statement that uses count or sum functions when extracting the field in the field editor it brings me a Memo field. Data type should be Float or numeric type, but extracting ftMemo. Why does this happen?
VirtualQuery is built using the SQLite engine. When the SQLite engine cannot determine the type of the field returned by the query, we create the corresponding Field of the Memo type. In order for such fields to be created with the type required by a developer, you can use DataTypeMapping, a special mechanism provided by our components. You can use this feature both in Design Time with the help of VirtulalQuery Editor, and in Run Time:
where 'SumResult' is the name of the field returned by the query.
Code: Select all
VirtualQuery.DataTypeMap.AddFieldNameRule ('SumResult', ftInteger);