Hi,
I use some DBGrid to show memos field.
If I done this :
SELECT CAST(SUBSTR(My_memo,0,255) AS VARCHAR2(255)) AS My_Memo_txt FROM My_table
It works with TUniQuery but with TVirtualQuery the only thing I have in my DBGrid is '(memo)'.
Is there anything to do with VirtualQuery, for now I use calculated field but if you have another solution.
Regards
Memo and DBGrid
Re: Memo and DBGrid
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:
VirtualQuery.DataTypeMap.AddFieldNameRule ('My_Memo_txt', ftString, 255);
VirtualQuery.DataTypeMap.AddFieldNameRule ('My_Memo_txt', ftString, 255);