>>I use the follow code to get Unique Keys with VFP tables
>>
>>Local lgetUniqueKey
>>Use myCounter
>>IF Flock()
>> Replace myCounter.counter With myCounter.counter+1
>> lgetUniqueKey= myCounter.counter
>> Flush In myCounter Force
>> Unlock
>>Endif
>>
>>Could you suggest some equivalent code if the MyCounter table is an MSSQL table?
>>Please no autoinc field or global unique identifiers
>
>Please also read this a bit complex discussion on this very topic
>
>
http://forum.lessthandot.com/viewtopic.php?f=17&t=6518&start=0&st=0&sk=t&sd=a&hilit=NiikolaThaks Naomi.