Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select expression for both VFP and SQL DB
Message
De
29/03/2019 09:48:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01667660
Message ID:
01667690
Vues:
46
>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'.
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform