General information
Category:
Coding, syntax & commands
>Here is the complete code:
>
>function kUniqueID
>*-
>lparameters tcTable,tcTag
>*-
>if empty(tcTable) or empty(tcTag)
> *-
> return(int(seconds() *100000 + day(date())))
>endif
>lcTable = tcTable
>lcTag = tcTag
>*-
>if eof(lcTable)
> lnRecNo = 0
>else
> lnRecNo = recno(lcTable)
>endif
>*-
>do while TRUE
> lnID = int(seconds() *100000 + day(date()))
> go top
> if seek(lnID,lcTable,lcTag)
> loop
> else
> exit
> endif
>enddo
>*-
>if !empty(lnRecNo)
> go (lnRecNo) in (lcTable)
>endif
>*-
>return(lnID)
>
>HTH,
>Tom
You don't need GO TOP before SEEK(). :)
Vlad
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only