>Note: (Used English can be faulty, I use a translator.)
>
>I use a view that recovers me the registrations of a table that has an index
>candidate that unites three fields; and it recovers the data on the base of two
>conditions, which you leave like it continues:
>
>SELEC Fields FROM Table WHERE Field1 = ?cC1 AND Field2 = ?cC2
>
>Then use a form where the user can publish the registrations on a control grid.
>The problem is that when I use Buffering=3 (Optimist for lines) when adding
>registrations, it happens the error #1884 ' the unicidad of the índice' has
>been violated, although I generate the code automatically and when running the
>one it traces everything it is unchained correctly; and when I use Buffering=5
>(Optimist for tables) after adding 2 registrations, to the third registration
>that I add, it causes that the immediately previous one disappears of the grid.
>
>*-- Spanish..
>Uso una vista que me recupera los registros de una tabla que tiene un índice
>candidato que une tres campos; y recupera los datos sobre la base de dos
>condiciones, la cual se ve como sigue:
>
>SELEC Fields FROM Table WHERE Field1=?cC1 AND Field2=?cC2
>
>Luego uso un formulario en donde el usuario pueda editar los registros sobre un
>control grid. El problema es que cuando uso Buffering=3 (Optimista por filas)
>al agregar registros, ocurre el error #1884 'Se ha violado la unicidad del
>índice', aunque genero el código automáticamente y al correr el trace todo se
>desencadena correctamente; y cuando uso Buffering=5 (Optimista por tablas)
>después de agregar 2 registros, al tercer registro que agrego, causa que el
>inmediatamente anterior desaparezca del grid.
>
>
>Si tienen alguna sugerencia, agradecería enormemente su ayuda.
Me parece que podrias tener un problema con el DELETE. Si has borrado un registro y vuelvas a crear un nuevo con la misma llave te va a ocurrir el error 1884.
Si es esto el problema tienes dos soluciones. La primera es añadir un filtro a tu index (! DELETED()).
La otra, que es mejor, es no usar claves que dependen del cliente, sino que generadas por el sistema, incrementandose de si mismas.
Jose