Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EVALUATE() Equivalent function in .NET
Message
De
17/07/2007 18:36:03
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
17/07/2007 18:31:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01241330
Message ID:
01241331
Vues:
28
I really suck at data handling in .NET - I am forever spoiled by the relative simplicity of VFP <g>, but I seem to remember that you have to assign a string to some object, a string that contains the SQL statement (SELECT, INSERT, or whatever you need). In this case, I believe that at least in this particular instance, you don't need the flexibility of evaluate(), you just generate the string as an expression.

>Is there any equivalent function to EVALUATE() in C#?
>
>I need to be able to simulate the TEXT TO function for dynamically building SQL queries based on values generated by the system, for example I'd like to do something like this:
>
>"SELECT * FROM customers WHERE record_id = '<>'"
>
>Where the ds.record_id is some class property or field which may not be known in advance i.e., it could be ds.name or ds.somethingelse. And the "SELECT" statement is also not know in advance.
>
>Any ideas on how to accomplish this in C#?
>
>Thanks in advance.
>
>Bob
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform