Visual Basic 6

Currently reading:
Visual Basic 6

K

Klemster

Guest
a part of a project I have to do is to be able to save delivery information to a random access database. Each delivery needs to have a unique order number. Does anyone know away of generating a unique order number for each delivery??
 
Public Function RandomNumber(Upper As Integer, _
Lower As Integer) As Integer
'Generates a Random Number BETWEEN the LOWER and UPPER values
Randomize
RandomNumber = Int((Upper - Lower + 1) * Rnd + Lower)
End Function

Ed
____________________________________________________________
1.2 Bravo 80 SX
 
you can generate a unique hashcode for each delivery, u would need to base the hash on some data for example-

Dim DeliveryName As String = "delivery"
Dim deliveryNumber As Integer = _ DeliveryName.GetHashCode

the generated hashcode for this would be 1402049746
 
visual basic

do people still use that?

save your time learn visual.net and sql they will get you a job!

ashtag2.jpg


Anything With Tits or Wheels Will Cost You MONEY!!
 
set the field in the database to auto number, then everytime a new delivery is saved it will create a new number
 
Ash, common misconception that. Thinking that you need to know the newest and latest big thing
Heard of cobol? now THATS where the money is! If you can decipher spaghetti code cobol, your worth a fortune to some of the biggest busineses in the world

Buzz
The champion of the Bravo 1.4
& now ex owner of a Bravo 1.8

 
thanks for the help lads, i'll try it tomorrow because I've had enough of vb for today.

I'm in my first year in college and will be going on to that next year, best to have good foundations to build on..as they say!

Yep, cobol has stood the test of time!
 
Visual Basic.

Exactly what language are you wanting this component in?
 

Similar threads

K
Replies
4
Views
205
klemster
K
K
Replies
8
Views
719
K
C
Replies
3
Views
199
B
Back
Top