Copy link to clipboard
Copied
Hi There
We have a fairly sophisticated database that's written in VFP for MySQL.
I'm building some insert/update pages for our customers to be able to insert and update records in the database, this is where it get's a little tricky. There is a program that handles certain business rules, and alos look's after assigning certain key's in a certain manner, to maintain database integrity.
Now, I can insert certain fields into certain tables with no poblems...however one part of the program is looking at a table field, reading it for use in the record, then incrementing it - however it's not a plain old auto-number, the VFP program itself is incrementing it, as it is a combination of numeric & alpha values...
so, would it be best to find some way of being able to connect to this program?
or
have the program converted so that the same procedures run on the database at the time of record insertion??
Thanks
Pete
I have the VFP if anyone would like to see it...
Copy link to clipboard
Copied
VFP = Visual FoxPro?
Copy link to clipboard
Copied
Sorry Stephen...yes Visual Fox Pro...the database is MySQL
Copy link to clipboard
Copied
Yeah I thought that.
FoxPro is xbase. In other words, it it's own language. I don't know of any way to "convert" Fox code to PHP. Connecting to the tables is easy (in PHP), though.
I'd rewrite the program. Can you read the Fox code? Is the problem, that the code is encrypted?
As for connecting to the code.. that depends on the code. Fox itself is easy to connect to via COM, ADO, ODBC, etc, etc.
Copy link to clipboard
Copied
As for connecting to the code.. that depends on the code. Fox itself is easy to connect to via COM, ADO, ODBC, etc, etc.
mmm...this interests me...my foxpro developer provided me with a .dll and a com alternative...but i haven't a clue how i would connect my php pages to this? it would be great to be able to do this...as all of the business rules would be adhered to...
do you have any idea how i could go about this? or where I could get etra information?
Thanks
Pete
Copy link to clipboard
Copied
So he did provide a way to get at the data?
There's an ODBC driver for Fox, too you know. But you can use COM objects - how familiar are you with PHP?
COM objects (keep in mind, I'm running Mac and Linux now.. so going from memory); you have to register them first in the os. Then you can access them in PHP. Here's a decent tutorial @ http://www.phpbuilder.com/columns/venkatesan20030501.php3?page=1
A .dll file is a library. Looks like he left you a set functions to use to interact with the program. So there's hope. You got some groking to do. ![]()
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more