Hi Jim,
It seems to me that the problem lies in the inc_key() function. That's where the duplicate key is being produced.
Regards,
Liam
>Is anyone aware of why the following code will not work?
>
>USE master
>DO WHILE !RLOCK()
>ENDDO
>t_val = inc_key(members)
>REPLACE members WITH t_val
>UNLOCK
>thisform.TbxID.Value = t_val
>
>I have implemented this same code one numerous applications every time I want to add a record. When I try to do it with my current client, I am geting a lot of duplicate key assignments. We have disabled write-back cache on the server and workstations, and I have been executing Flush commands, but we are still getting duplicate values.
>
>The only difference between this and other applications is that we are running on Windows 2000 instead of Novell. We do not seem to have this problem at other client sites. We are using VFP 7.0, other clients are using 6.0 or 7.0
>
>Any ideas of what is going on? Has anyone else encountered this problem?
Liam O'Hagan
MCP VFP Desktop Apps