Expression Evaluater - No parsing code required!

Category:
Dates and Math
Type:
Snippets
Difficulty:
Beginning
Author:
Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5, Visual Basic.NET

More information:
Rather than write an expression evaluator from scratch or include someone elses code, use ADO to evaluate the expression as a sql statement. All you need is a reference to the Microsoft ActiveX Data Objects library. You can, of course, include any sql function which makes it very easy to do things like date calculations, etc

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: