>Hi Cetin,
>Thank you very much for your input and for sharing your code.
>I am using a Cursor Adapter in a data-driven mode. All fields that have to be in the SQL Select are in a meta .DBF table. So, for calculated field (like the one I have asked in this thread) I use the "Cast(0 as bit)" in the field_expression column of the DBF. My solution is either not to use the calculated column, when the back end is VFP. Or, add another field to the meta DBF (e.g. VFP_EXPR) and enter the "Cast(0 as Logical" in this field.
>Then, when the CA is initialized, both - VFP and SQL - will be covered.
>But I have not yet decided what to do for VFP.
I am also using CursorAdapter + direct commands like SQLQueryInto (does a select into a cursor with parameters), SQLNonQuery (runs non query command with parameters like update, delete), SQLInsert (as name suggests) and SQLExecuteScalar.
Saying meta, do you mean CA classes and Cursor structures? In my case, I found it more appropriate to have 2 sets of CA classes, CA_VFP.prg and CA_SQL keep them. I instantiate the CA from one of them based on current 'app mode'.