devxlogo

Tip Bank

Factorial – The factorial of a number

‘ The factorial of a number” if NUMBER is negative or >170 it raises an’ “subscript out of range” errorFunction Factorial(ByVal number As Long) As Double Static result(170) As Double

Log10 – Base-10 logarithm

‘ Base 10 logarithmFunction Log10(number As Double) As Double Log10 = Log(number) / 2.30258509299405End Function

Fract – The fractional portion of a number

‘ The fractional part of a floating-point number’ note that negative numbers return negative valuesFunction Fract(number As Variant) As Variant Fract = number – Fix(number)End Function

Obtaining @@Identity with VBScript and ADO

Question: Using VBScript, how can I use the @@Identity SQL Statement to set the keyfield of a record just entered to a variable? Answer: You can issue multiple SQL statements

Looking for Snip.exe to (Un)register Components

Question: I’m looking for a copy of snip.exe. This program registers/unregisters components/DLLs under a given directory. Answer: I don’t know about SNIP, but how about an even easier method? Copy