Visual basic 6

Currently reading:
Visual basic 6

Joined
Aug 3, 2006
Messages
1,784
Points
313
Location
Co. Cork
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??
 
cant you just enumerate all entries in the database for numbers on load into a string so it would come out "152,3245,542,345,64,452..."

then use something along the lines of

Code:
Dim i as Integer

Do
 If Instr(1, DatabaseNumbers, cStr(i)) <> 0 then
  DatabaseNumbers = DatabaseNumber & cStr(i) & ","
  Exit Do
 Else
  i = i +1
 End If
Loop

Then use i as the entry number. The whole process would take seconds even for a large database.
 
Last edited:
Back
Top