Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple and Smart way to secure your data in VFP Tables
Message
De
09/07/2007 03:55:55
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Simple and Smart way to secure your data in VFP Tables
Divers
Thread ID:
01238538
Message ID:
01238538
Vues:
66
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)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform