>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?
I don't know if this could help, but here's what I am using:
LOCAL lnCompteur
lnCompteur=0
DO WHILE (NOT RLOCK()) AND (INKEY(0.1)=0) AND lnCompteur<=25
lnCompteur=lnCompteur+1
ENDDO
REPLACE Numero WITH Numero+1
UNLOCK
This, of course, assumes that you are on the right record in the table which holds the primary key of all tables and on the proper record.
I am also using SYS(1104), for our Web application, to make sure the data is saved to disk when a transaction is finished.
This might also be related to a bad disk or some of that. Have you checked your Event Viewer just to make sure all is ok?