How can I protect VFP database ?? 
Author Message
 How can I protect VFP database ??

How can I protect VFP database *.dbf being access or modify using
other utility tool ?? So the user only can using application to go in
to update the data.


Sun, 01 Jan 2006 18:14:05 GMT  
 How can I protect VFP database ??
The only answer to prevent people from opening it is to put it on a file
server that no one has access to. To prevent them from looking at the data
inside, you could use encryption to obfuscate the data. If you really need
data security consider using VFP to access data on a true Client Server
database - e.g. SQL Server, Oracle, DB2, MySQL, etc.

One freeware solution to encryption is the CryptPak by Milan Kosina
(http://milan.jikos.cz/). Another is CIPHER50.FLL based on work by Tom
Rettig and available at the UT (http://www.universalthread.com/ ) in the
Download area.

VFP 7.0 & 8.0 have a Crypto API component in the Foundation Classes
that uses the MS API encryption.

And of course, if you are only encrypting fields you can always "roll your
own" - high powered encryption schemes are severely crippled when you use
short data strings, so your algorithm will be just as "secure".

If you were encrypting the whole table, then one of the easiest and most
secure is Cryptor IV by Xitech (http://www.xitech-europe.co.uk/ ), but it is
a commercial product. They have a demo version to show how easy it is to
implement, and in my testing, there was very little overhead introduced on
all but the largest tables. I've used different versions in custom apps
under both FPW and VFP.

NetLib also has Encryptionizer (http://www.netlib.com), but I've never used
it.

Rick

Quote:

> How can I protect VFP database *.dbf being access or modify using
> other utility tool ?? So the user only can using application to go in
> to update the data.



Sun, 01 Jan 2006 20:30:56 GMT  
 How can I protect VFP database ??
Hi Eng,

You haven't said which version of VFP you are using. With VFP7 and VFP8 you
can use the Database Events for a degree of security, although this is not
the type of security you can get with an SQL database.

In the BeforeOpenTables event you can check for the presence of some
instantiated object such as an "application object" you might have in your
application, and not open the tables if it's not there. Furthermore, when
Database Events are in use the tables are no longer accessible through ODBC
so ordinary users will be less able to access them. Tables can still be
accessed through OLE DB but it's more complicated than a casual user can
handle.

--
Cindy Winegarden  MCSD, Microsoft Visual FoxPro MVP


Quote:
> How can I protect VFP database *.dbf being access or modify using
> other utility tool ?? So the user only can using application to go in
> to update the data.



Sun, 01 Jan 2006 21:04:32 GMT  
 How can I protect VFP database ??
The only way to guarantee it is to place it on a server that no one has
access to, then have a COM DLL running on the server that handles all the
data access for you. Other options mentioned, such as encryption or DBC
events will not stop someone from opening the DBFs with a text editor and
changing the data.

--
Craig Berntson
MCSD, Visual FoxPro MVP
Author, CrysDev: A Developer's Guide to Integrating Crystal Reports
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org


Quote:
> How can I protect VFP database *.dbf being access or modify using
> other utility tool ?? So the user only can using application to go in
> to update the data.



Sun, 01 Jan 2006 23:34:25 GMT  
 How can I protect VFP database ??
Your method is very interesting !! Is there any software in market
provide this kind of feature ??
Quote:

> The only way to guarantee it is to place it on a server that no one has
> access to, then have a COM DLL running on the server that handles all the
> data access for you. Other options mentioned, such as encryption or DBC
> events will not stop someone from opening the DBFs with a text editor and
> changing the data.

> --
> Craig Berntson
> MCSD, Visual FoxPro MVP
> Author, CrysDev: A Developer's Guide to Integrating Crystal Reports
> www.craigberntson.com
> Salt Lake City Fox User Group
> www.slcfox.org



Mon, 02 Jan 2006 08:55:34 GMT  
 How can I protect VFP database ??
Hi, Eng Teng!
You wrote  on 16 Jul 2003 17:55:34 -0700:

 ET> Your method is very interesting !! Is there any software in market
 ET> provide this kind of feature ??

I suppose, you have to read more about MTS/COM+ and their ancestor -
SOAP/WebServices. When you'll get the consept, it will be as simple as this code:

DEFINE CLASS MyServer AS Session OLEPUBLIC

PROCEDURE GetSome (tcUserName AS String, tcTable AS String, tcFilter AS
String)
* User validating stuff
* Raise error if not enough privileges
OPEN DATABASE MySecureStoredDBC SHARED
SELECT * FROM (m.tcTable) WHERE &tcFilter. INTO CURSOR tmp1
RETURN CURSORTOXML(... "tmp1",...)
ENDPROC

PROCEDURE SetSomeData (tcUserName AS String, tnKey AS Integer,  tcField1 AS
String, tnField2 AS Integer)
* User validating stuff
* Raise error if not enough privileges
OPEN DATABASE MySecureStoredDBC SHARED
UPDATE SomeTable SET cField1 = m.tcField1, nField2 = m.tnField2 WHERE
tnPKField = m.tnKey
RETURN .T.
ENDPROC

PROCEDURE ExecuteSomeVFPScript (tcUserName AS String, tcScript AS String)
* User validating stuff
* Raise error if not enough privileges
RETURN EXECSCRIPT (m.tcScript)
ENDPROC

ENDEFINE

AFAIK good resources on abovementioned topics you may find on
www.west-wind.com and of course www.google.com :)

WBR, Igor



Wed, 04 Jan 2006 01:24:54 GMT  
 How can I protect VFP database ??
Go to my web site and click the Articles link. There, you will find links to
my FoxTalk articles on COM+ that are now on the MSDN web site.

--
Craig Berntson
MCSD, Visual FoxPro MVP
Author, CrysDev: A Developer's Guide to Integrating Crystal Reports
www.craigberntson.com
Salt Lake City Fox User Group
www.slcfox.org


Quote:
> Your method is very interesting !! Is there any software in market
> provide this kind of feature ??




Quote:
> > The only way to guarantee it is to place it on a server that no one has
> > access to, then have a COM DLL running on the server that handles all
the
> > data access for you. Other options mentioned, such as encryption or DBC
> > events will not stop someone from opening the DBFs with a text editor
and
> > changing the data.

> > --
> > Craig Berntson
> > MCSD, Visual FoxPro MVP
> > Author, CrysDev: A Developer's Guide to Integrating Crystal Reports
> > www.craigberntson.com
> > Salt Lake City Fox User Group
> > www.slcfox.org



Mon, 09 Jan 2006 00:27:34 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Help with protecting database from network crashes?

2. Protect database in fpd2.6

3. Request a password protected Paradox 4.5 DOS Database

4. Can a database be password protected?

5. Protecting FP database files

6. Help: password protecting a Foxpro database or table

7. Protecting tables and databases

8. Need to protect a VFP Web application Idea!

9. Protecting vfp application using a dongle

10. - How to protect VFP apps from being REFOXed?

11. protect vfp-dbffiles

12. Linking VFP 5.0 databases to MS ACCESS 97 databases

 

 
Powered by phpBB® Forum Software