Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple and Smart way to secure your data in VFP Tables
Message
 
À
09/07/2007 03:55:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01238538
Message ID:
01238551
Vues:
11
Hi Sanjay

Thanks for sharing your ideas with us. Questions, what if I delete the CDX file? Will I be able to access the DBF again after answering Yes to 'Index not found' type of error?

I haven't tried in VFP for tables used in a DBC, but I am sure you can for free tables. Just alter the first 5 bytes of the DBF header using low-level files functions and reset them when you want to use the tables.

Hope it helps.

>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.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform