I've completed the new dbf files support.
As I've already pointed, since the dbf files support was dropped from PHP standard distributions, I've decided to code from the scartch a new class to do that.
Please, use carefully (specially to write operations) since the code is fully new and must be considered ALPHA.
Operations that set or get the field content handles all data types (original character, numeric, logical and date) as strings.
There is no memo support.
See the sample code for more info.
If you are wondering why is the reason to do this, it is simple: Imagine that you have a Harbour based app running in a LAN and shared by various users, and you want to access the same files with a web client. The only thing that you need is to install an AMP server in the machine where the files are located and make the machine available via Internet, then HMGSCRIPT apps and LAN apps could share the same data.
IMPORTANT: I'VE NOT TESTED THE CLASS IN SUCH ENVIRONMENT YET, PLEASE CONSIDER THAT SOME ADJUSTMENTS COULD BE REQUIRED (SPECIALLY REGARDING SHARING AND LOCKING). THERE IS NO SECURITY IMPLEMENTED (YOU MUST DO IT FOR ANY REAL WORLD USE). USE FOR TEST ONLY AND REPORT ANY PROBLEM FOUND ON THIS THREAD. IDEAS AND CODE TO ENHANCE THE CLASS ARE WELCOME.
http://sourceforge.net/projects/hmgscript/NEW ON RELEASE 0.37
- new: getRecno( nRow ) Browse method.
- new: FieldPut ( cFile , nRecno , nField , cValue ) function. Changes a record in a dbf file.
- new: Delete ( cFile , nRecno ) function. Mark a record as deleted in a dbf file.
- new: Recall ( cFile , nRecno ) function. Removes a delete mark from a record of a dbf file.
- new: FieldGet ( cFile , nRecno , nField ) function. Gets a field from a record of a dbf file.
- new: Append ( cFile ) function. Appends an empty record to a dbf file and returns its recno.
Roberto Lopez (http://www.hmgforum.com)
Enjoy!