Triggers are functions that are called automatically when the data in a table is updated. They are possible only on tables that are part of a database and not on free tables. You have to first open the database and then use the MODIFY PROCEDURE to open the procedure file of the database. In this you define the functions. Then in the MODIFY STRUCTURE screen, you give the name of the function to be called when Adding / Updating / Deleting Records. There is a screen shot at the bottom.
Regards
Tushar
> i do not know about trigger.
> please explain this with a example.
>
> i am not giving full VFP to my users.
> i am using vrunfox9.exe as command window.
>
> i want to stop the use of my table outside of the software.
>
>
> warm regards,
> mk.
>
> > You can create a trigger. Triggers are fired every time a record is added / updated / deleted. It does not matter if it is from a browse window or through the application.
> >
> > Secondly, do not give your user the full VFP IDE. Give then your EXE files and the VFP runtime files. Then they will not be able to browse.
> >
> > Regards
> > Tushar
> >
> > > 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)