> if some one add records from BROWSE with CTRL+Y
>
> how we can track that records.
>
> warm regards,
> mk.
>
>
> > > create 2 variables in your main.prg
> > >
> > > public abc, cba
> > >
> > >
> > > when you index your tables use this variables like :
> > >
> > >
> > > use acchead
> > > index on head for abc=cba tag head
> > >
> > >
> > > now try to use this file from outside of the programme
> > >
> > > this will give you error "variable cba not found"
> > >
> > > warm regards
> > > mk.
> >
> > MK,
> >
> > I do not really think that introducing an error into the table is the best way to accomplish database security. There are a number of other solutions that solve this Ahsan's problem better. For that matter, he might be better off to simply create a log showing who modified what record and when. I do this for some of my more sensitive data. I use insert and update triggers to insert the record to a similar table on another database. The table in the other database shows me every iteration of that record as it is saved. If a field value changes from a 1 to a 2 and then back to a 1, I will see three records showing what that record looked like when it was saved. All of my tables have an nUserID field and a tLastMod field, so I can track who did what to each record and I can even tell you when it was done.
> >
> >
> > Ken
> > You shall know the truth - and the truth shall set you free. (John 8:33)
MK
Tushar is quite correct about triggers. This is what I use for my sensitive tables. There are a number of advantages to triggers, not the least of which is that your triggers work regardless of how the insert/update/delete is done. If you modify the data using your app, you need not change any of the app code. If you develop another app that uses this same data, you do not have to incorporate any new code. If you access the table using a browse window or even using somebody else's software, the trigger still works. The real advantage to triggers is that you can use them to inforce referential integrity. If you are not familiar with the use of stored procedures and triggers, I recommend that you set aside some time and play with them.
Ken
You shall know the truth - and the truth shall set you free. (John 8:33)