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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pHp and DBF

Status
Not open for further replies.

Venkatvc

Programmer
Dec 18, 2019
24
IN
I have a domain.

At present I am collecting information from people and sending it to my mail through pHp.

If I need to store them in a dbf, which I may download daily for offline purposes, should I install anything additionally on server side? Or is it just enough if I upload a dbf file with no records?

The script will be pHp only. I just want to access dbf file via pHp.

-------------
Looking for knowledge from anyone, anywhere.
 
There are a bunch of PHP functions that can manipulate DBFs. See here for the documentions:

Although there is a dbase_create() function that will create a DBF from scratch, you might find it easier to create an empty DBF ib VFP, and then upload it to your server. You can then use dbase_add_record() to populate it with data.

I suspect that the PHP functions only work with pre-VFP versions of the DBF format (the docs refer to dBASE, which might mean dBASE III Plus). If so, if you create the DBF in VFP, you need to copy it to a type FOX2X.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Well, as Mike found there are some dBase functions. I have no idea how compatible that would be with VFP DBFs, even when you limit yourself to free 2.x dbfs.

But why so complicated? Alone the download for acting on the data local and then I assume also upload it again?

MySQL is your solution.

There is a whole book of VFP using MySQL from Hentzenwerke.

If you would want to work on DBFs just for the convenience you are used to that, then you would want to establish a WAN. And hosters usually don't offer that and there's much involved in that and the bandwidth and latency will not be good just because you want to avoid a bit of SQL to a MySQL database you most lilkely own with your hosting plan anyway.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Thanks guys.

I'd try Mike's idea first.

It's not just I am used to it. Already there's a software distributed to my friends. At present I am asking them to key in the data received through email. If Mike's idea works out, there will be a considerable time saved and also avoid few errors.

-------------
Looking for knowledge from anyone, anywhere.
 
In the document linked by Mikes post there is another link near the bottom.


If your PHP can execute an external program, I think this would probably get you going in a manner that might be more robust.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Even in a finished software working with DBFs you could easily write a five liner getting data from a MySQL table and merge it into a DBF. There is no need for PHP acting on a DBF.

You especially won't succeed in a download and replace DBF strategy, if the dBase module doesn't act on the DBF format the software needs.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top