04.08.2013 Views

Printing - FoxTalk - dFPUG-Portal

Printing - FoxTalk - dFPUG-Portal

Printing - FoxTalk - dFPUG-Portal

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

do a single REPLACE:<br />

cNewMessages = ''<br />

FOR n = 1 TO nMessages<br />

cNewMessages = cNewMessages + CHR(13) + cTransMsg[n]<br />

ENDFOR<br />

IF NOT EMPTY(cNewMessages)<br />

REPLACE TranLog WITH cNewMessages ADDITIVE<br />

ENDIF<br />

I once had a text management application that would read in text files, do on-the-fly translations,<br />

and write the text files a line at a time to a memo field. I noticed that the memo file was bloating<br />

by a factor of several hundred K per day, even though no new records were being added to the<br />

table. This coding trick got rid of most of the "bloat."<br />

Conclusion<br />

Fiddling with memo block sizes isn't one of the most pressing issues in FoxPro database<br />

development, but as you deal with larger and larger databases, some attention to detail in this<br />

area can have a significant impact on disk storage efficiency. And, as you saw in the code<br />

examples I just shared, paying attention to the subtleties of syntax can produce big savings, too.<br />

Finally, I suspect that Visual FoxPro is taking us in directions that are likely to cause us to<br />

provide database administration services to clients in addition to application design and<br />

development services. Knowing how to tune memo fields is one skill that will differentiate the<br />

kind of administration you can provide from what the client can do in-house.<br />

Bob Grommes is editor of <strong>FoxTalk</strong> and president of Software Excellence in Kalamazoo, Michigan.<br />

CompuServe 74126,72.<br />

Ease Form Design Tasks with SUPERCLASS<br />

Whil Hentzen (4)<br />

GENSCRNX fans probably wonder what Ken Levy has been up to since the release of Visual<br />

FoxPro. Wonder no more: he's produced another "must have" that every Visual FoxPro developer<br />

will want in his bag of tricks.<br />

Ever had one of those days? The type of day where nothing goes right? You're working in Visual<br />

FoxProand you have to look at the Language Reference for just about every command you type.<br />

For some reason, you can't remember the syntax for even the simplest commands, like WAIT<br />

WINDOW or SKIP. You even tried to do some simple data entry in a Browse window, but<br />

couldn't figure out why Ctrl-N wasn't working when you were adding new records.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!