Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: subhankar pandey
  Where is subhankar pandey?
 Kolkata/Delhi
 India
 subhankar pandey
 To: Olaf Doschke
  Where is Olaf Doschke?
 Hamburg
 Germany
 Olaf Doschke
 Tags
Subject: RE: How to prevent to modify record
Thread ID: 155246 Message ID: 155296 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Saturday, December 29, 2007 8:57:01 AM         
   


> > Hi All,
> >
> > I've simple one question. How to prevent to modify the records once it is taken print-out thru report writer.
> >
> > Best Regards
> > Subhankar
>
> your technical possibilities are limited, if you insist on locking the record only. But you can do several things to make changes at least much harder or identify changes.
>
> Based on the idea of Mike and Ken with the "printed" field, you could create an update- and delete-trigger that returns .f. if that field is set .t. and therefore would prevent changes or deletes of printed records.
> But then someone whol really wants can turn that triggers off.
>
> You could add a checksum field and calculate a checksum with SYS(2017,"checksumfield",3), which would exclude the checksumfield itself from computing the checksum. If you call SYS(2017,"checksumfield",3) again and get a different result than what's stored in there the record changed from when the checksum was calculated.
>
> Your best way is to copy the records to some archive, eg a log or history table, which is helpful in general to find out the history of a record. In such a log table you could also store who changed the record and when there was a change, you can for example store SYS(0) with the logged record.
>
> Bye, Olaf.

Dear Olaf,
Yr 1st idea pertating to logical field 'Im working on it, but however yr 2nd idea is not yet clear to me I mean to say "SYS(2017)....", would request to provide some sort example(code) to enable me to proceed.

Sorry If I'm giving trouble

Regards
Subhankar

ENTIRE THREAD

How to prevent to modify record Posted by subhankar pandey @ 12/28/2007 1:20:53 PM
RE: How to prevent to modify record Posted by Mike Gagnon @ 12/28/2007 1:59:13 PM
RE: How to prevent to modify record Posted by Ken Murphy @ 12/28/2007 2:00:27 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/29/2007 8:43:59 AM
RE: How to prevent to modify record Posted by Olaf Doschke @ 12/29/2007 12:45:49 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/31/2007 6:22:15 AM
RE: How to prevent to modify record Posted by Ken Murphy @ 12/29/2007 1:23:50 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/31/2007 6:20:37 AM
RE: How to prevent to modify record Posted by Olaf Doschke @ 12/28/2007 10:55:48 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/29/2007 8:57:01 AM
RE: How to prevent to modify record Posted by Olaf Doschke @ 12/29/2007 1:10:12 PM
RE: How to prevent to modify record Posted by subhankar pandey @ 12/31/2007 6:24:55 AM