Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Flock equivalent in SQL
Message
From
26/08/2009 11:17:57
 
 
To
26/08/2009 11:09:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01420778
Message ID:
01420799
Views:
80
>AFAIK, there's no equivalent of FLOCK in SQL Server. Why no autoinc or GUID fields?
>
>>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

This procedure is not only for Unique record key but for invoice numbers etc. as well.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform