Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple and Smart way to secure your data in VFP Tables
Message
From
09/07/2007 03:55:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Simple and Smart way to secure your data in VFP Tables
Miscellaneous
Thread ID:
01238538
Message ID:
01238538
Views:
67
Hi Friends,
I stumbled across something during the software development and thought of sharing it with all of you. Many of you may have searched on ways to protect the VFP tables from being opened outside the application. At one time i searched too but with little success and than i gave up but now there is a way to protect your valueable tables from being opened outside the main VFP application.

There is no rocket science just a simple trick -
PUBLIC oApp
oApp=CREATEOBJECT('SecurityClass')        && Create your PUBLIC security object

DEFINE CLASS SecurityClass AS Custom 
   Sale_ID=3
ENDDEFINE
CREATE TABLE 'TRANSDETAIL.DBF' NAME 'TRANSDETAIL' ;
                         (TRANSACTION_ID         I NOT NULL, ;
                          PARENT_ID              I NOT NULL, ;
                          TRANS_ID               I NOT NULL, ;
                          MIXIN_TRANS_ID         I NOT NULL, ;
                          MIXIN_DETAIL_ID        I NOT NULL, ;
                          DESCRIPTION_ID         I NOT NULL)

INDEX ON DESCRIPTION_ID TAG DESCRIPTION_ID FOR DESCRIPTION_ID==oApp.Sale_ID COLLATE 'MACHINE'   
  


Now you can use the table TRANSDETAIL only when the oAPP object is available. Which will be available to the table from within your VFP Application.

Any user who tries to open the TRANSADETAIL.DBF without the oAPP object will get the error
Alias 'oAPP' is not found


Using the above method all of us can develop simple and secure applications without the need of 3rd party applications.
Sanjay Dhiraj Patel

MCSE, MCDBA

Net2Biz (Thailand)
Next
Reply
Map
View

Click here to load this message in the networking platform