Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative databases

Status
Not open for further replies.

phita

Programmer
Jun 8, 2001
82
0
0
KE
Hi,
I am a die-hard VFP programmer (VFP 6.0). I like the language but what lets me down is the database (.dbf). I get constant complaints from my clients about crashed DBFs when there's a power failure. I am looking for an alternative database (not Access coz of its speed), while retaining the programming language to act as a front-end. Are there low-cost database systems that I can use ? (cheaper than SQL Server).

Thanks, Phita.
 
You should check out MySQL - it's a free, Open Source database that has been around a while. It's very fast and reliable. I run my website on it.

It works with VFP as well as SQL Server; you can use SQL Pass Through or Remote Views to access the data via ODBC. And while you can run it on Windows, it is much better on Linux, meaning you can create a server farm or a mirror server for only the cost of hardware - no additional software license fees.

There is a free email list on Yahoo groups named "VFPMySQL" dedicated to discussing issues on using MySQL as a backend for VFP. You might want to check that out if you decide to go that route, as there are people there who have experience working with the two products together.

-- Ed
 
Hi Ed,
Thanks for your reply. I think I will check out MySQL as you advised. Just one more question: Does it ever crash, say if there is a power failure and there were open tables?

Thanks, Phita
 
I haven't had any such experience, but I have read of others who had such power outages and were able to simply start up where they were when the power went out. I don't know of any database that could guarantee 100% reliability in such an event, but I do know that MySQL is rock-solid.

BTW, except for the time I had to turn the machine off to replace the CD-RW drive, I've been running MySQL on Linux for nearly 9 months without ever having to reboot. That's very different than my experiences with Windows systems!!

-- Ed
 
Thanks Ed, I am definitely going for it!!!

Phita.
 
Once MySQL is installed and running, install the ODBC driver on the machine you will be running VFP on. Create a System DSN to connect to a MySQL database, and then use that DSN from within VFP to connect to MySQL as you would to any other backend database. You can create remote views and work with native VFP cursors, or you can use SQL-passthrough if you prefer coding all your SQL commands yourself.
 
I had problems with open tables when the system power down accidentally. However I stop putting the tables directly in the DE of the forms and started using Local Views and I do not get any more problem (this is about 2 years now I havn't experience any problem)
 
One more thing, I read somewhere that MySQL does not support TRANSACTIONS. Is this true? Or can the VFP TRANSACTIONS be able to handle all the data integrity checking if there is a system crash and a table had been updated halfway? In such a scenario, can VFP be able to roll-back the changes and restore the tables as they were initially before the update began?
Thanks, phita.
 
Yes

and does not support contrainst so you cannot control if in your child table there are records that not match in parent table other than control that by your code.

If you want a very powerful DB take a look on FIREBIRD or Borland INTERBASE Open Source.

FireBird is a fork of Interbase OS and is more supported and bug fixed.
All FireBird and InterBase OS are free.
Works on W95, 98, Me, 2000, NT, Linux, Aix, Unix, Solaris...

Take a look at Andrea C.P.
Italy
 
MySQL 4 has transaction support. The older 3.2 versions do not.

-- Ed
 
phita

Forget me for interrupting, you guys are talking about
file corruption due to power failures and all of a sudden
jump to client server setups??? Would it be a little easier
if you protect the file server(or the server) with say a ups
(or other power protection device) rather than changing
the whole structure of your application. No matter what
kind of architecture you use, power line fortification is your
first line of defence against any kind of file corruption.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top