Information générale
Catégorie:
Installation et configuration
SNIP
>Since that almost never works, you can provide the DBC, DCT and DCX files in a memo field of a FREE table. When the database files need to be recovered, you can use StrToFile() function to recreate them. You would use FileToStr() function to get them into the memo fields.
>
>Then there is always Stonefield that I highly recommend for keeping your customers' database, tables, indexes, etc., all up to date.
Hi Mark,
Off topic, but what the heck. . .
FILETOSTR()/STRTOFILE() fascinate me. They appear to be a whole lot more "powerful" than the documentation betrays.
VFP Help mentions virtually nothing of this "power" and Hacker's happens to mention that these can be used to duplicate a .DBF.
Reading the Help I come to the conclusion that FILETOSTR() puts data into a memvar. That's all. In fact, since it specifically says "into a character string" I jump to the conclusion that it will be 1 very long string of character data.
BUT it actually does much more than that. I would never have guessed that it "preserves" the original "structure" of the information, letting STRTOFILE() make an exact duplicate of the original file! Yes, Hacker's and posts like yours clued me in, but this capability has (in my opinion) far-reaching value and ought to be documented right in the VFP Help. Sadly even the VFP 7 Help doesn't expand on this.
No reply required - just wanting to comment.
JimN
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement