Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to calculate from a string like
Message
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Titre:
How to calculate from a string like
Divers
Thread ID:
00588695
Message ID:
00588695
Vues:
57
My database contains a table of formulas that the users can insert into and edit. Being in a database field, they are stored as strings. How do I get VB to calculate the formula, once I read the formula string in from the database? My formulas are very complicated but using the example 'x + y', how do I get VB to calculate the value and give me the result? If I read the string into a variable like Calculation (ex. Calculation = rsDBcalc("Formula")), can I do something like Execute(Calculation) which would return the value of x + y ?

For a more complicated situation, if the database Formula field = 'IF a > b THEN a - b ELSE b - a END IF', how can I do that?

Much thanks for your time.
John
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform