Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shuffle PIN
Message
 
 
To
27/06/2005 02:19:27
Maltin Lacsina
Angeles Electric Corporation
Angeles, Philippines
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
MySQL
Miscellaneous
Thread ID:
01025682
Message ID:
01026660
Views:
18
This message has been marked as the solution to the initial question of the thread.
You can generate PINs randomly
CREATE CURSOR PINs (Pin I)
INDEX ON PIN TAG PIN
lnPins2Gen = 1000
lnPinMin = 10001
lnPinMax = 19999
RAND(-1)
DO WHILE RECCOUNT("PINs") < lnPins2Gen
	lnPin = RandInt(lnPinMin, lnPinMax)
	IF NOT SEEK(lnPin, "PINs", "PIN")
		INSERT INTO PINs VALUES (lnPin)
	ENDIF
ENDDO 
RETURN 

FUNCTION RandInt
PARAMETER tnLower, tnUpper
LOCAL lnRetVal
lnRetVal = int((tnUpper - tnLower + 1)*rand() + tnLower)
RETURN IIF( BETWEEN(lnRetVal, tnLower, tnUpper), lnRetVal, tnUpper)
>I think its like modulus example when I specify the 1000
>it will create 1000 number that with a 4 digit number.
>
>ex.
> 10012
> 10026
> 10031
> and so on...
>
>they said its modulus but is there another way that they will be almost imposible to detect the formula?
>
>I hope you get what I mean.
>Thanks a lot
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform