What is your back end? If it's a VFP native tables, you can have a candidate index on this field which would ensure uniqueness. You should trap for error yourself.
>Hi all,
>
>I have
>
>Plan.dbf
>cnumplan ( ex '600400' )
>cdenomplan 'Achat marchandises'
>
>
>I use local vfp view with BUFFERMODEOVERRIDE = DB_BUFOPTTABLE && optimistic table buffering
>
>In addition mode or edition , I don't want twice numplan = '600400'...
>
>In beforesave() , what can i put as sqlclause ?
>
>Sorry for my poor english
>
>bernhart
If it's not broken, fix it until it is.
My Blog