Showing posts with label Classes in VBScript. Show all posts
Showing posts with label Classes in VBScript. Show all posts

April 4, 2011

Create a function which returns a random number

How to set a "randomValue" to a variable and How to run an UPDATE within a Data Base using this variable
'set a random number - this function will be called to do updates
Function RandomNr
upperbound = 1000-1
lowerbound = i
For i=1 to upperbound
Randomize
RndNr = Int((upperbound - lowerbound + 1) * Rnd + lowerbound)
Next
RandomNr = RndNr
End Function