devxlogo

October 16, 1999

Write concise code with the IIf function

Use IIf when setting a value based upon an expression. This works only in situations where you have two choices, based upon the result of a Boolean expression. ‘long wayIf

Write concise code with Boolean expressions

When setting a Boolean value based upon the result of an expression, avoid using an unnecessary If/Then/Else structure. ‘Instead of using this lengthy syntax . . .If SomeVar > SomeOtherVar

Write concise code with the Switch function

Many VB developers don’t realize that the Switch built-in function can often save a lot of code. This function takes any number of (expr, value) pairs, it evaluates all expressions

Write concise code with the Choose function

The Choose function lets you often make more concise, albeit not faster, code, because it lets you replace a lengthy Select Case block. For example, the following code: Select Case

Counter in For-Next Statement

It is always easy for people who know Visual Basic to write code inVBScript. But sometimes you make some common mistakes because of the implementation differences between VB and VBScript.One

Rebuild Master Database

If you want to rebuild the master database you can run Rebuildm.exe command prompt utility. This utility allows you to rebuild the master database to change the character set, sort