Thursday, December 27, 2012

A Christmas Present

I usually try to get a small project done over the Christmas holidays. This year, I finally tackled something I’ve wanted to do for years: I’ve posted most of the session white papers and magazine articles I’ve written over the past 16 years (146 documents in all) at the Technical Papers page of my personal Web site, The list is alphabetical by title and includes an abstract and links to download the document and sample files (if there are any). Since the documents go back to 1996, some of them are likely out-of-date (I think “Windows 95 Issues for FoxPro” falls into that category), but most of them are still applicable. Note that anything presented or published in 2012 isn’t in the list yet.

Since most of the documents were originally in Microsoft Word, I automated the process of opening each one, writing the title and abstract to a table used to generate the list of articles, and saving the document as a PDF. As a result, although I spot-checked a lot of documents, there could be some glitches in formatting. Also, I sometimes presented a conference session on a topic I’d written a magazine article about, so I tried to remove duplicates as best I could. Please let me know if you find any problems or duplicates with these documents and I’ll get them fixed up.

Friday, December 14, 2012

When a Comma Isn’t

Stonefield Query has the ability to output reports to a CSV file. “CSV” is an abbreviation for “comma-separated values”, meaning there’s a comma between each value (which represents a field) in a row (which represents a record). Except when it’s supposed to be something else.

We recently had a customer in France report that when they output a report to CSV and then opened it in Microsoft Excel, numeric values didn’t come out right. I figured it was likely a regional setting, so I used the Control Panel Region and Language applet to change my setting to French (France) and voila (appropriate word choice, non?), was able to reproduce the problem. I thought perhaps the issue was that Excel didn’t like the fact that in France, a comma is used as a decimal separator, but changing a value like “45,25” to “45.25” didn’t fix the problem. Then I notice something I hadn’t noticed or heard of before: in the Customize Format dialog (click the Additional Settings button on the Formats tab of the Region and Language dialog), there’s a “list separator” setting. We in North America (and probably other places too) are used to having it be a comma, but for France, it’s a semi-colon.


Changing the CSV output to use a semi-colon instead of a comma for the separator fixed the problem. However, how to get the current value of the list separator? While VFP has functions to determine some of the user’s regional settings, such as SET(‘POINT’) (the character used for the decimal separator) and SET(‘SEPARATOR’) (the character used for the thousand separator), it doesn’t have one for this. Google turned up a few references to the Window API GetLocaleInfo function, but for some reason, that just gave me a blank rather than the expected comma or semi-colon. Fortunately, another site mentioned that it’s stored in the Windows Registry in the sList key of HKEY_CURRENT_USER\Control Panel\International.

So, now you can output a CSV file from Stonefield Query and while the “C” in “CSV” may not be accurate, the file is.

Thursday, December 06, 2012

Stonefield Query SDK Version 4.3

We are pleased to announce the release of version 4.3 of the Stonefield Query SDK. See the Stonefield Query blog for details on new features.

Wednesday, December 05, 2012

New VFPX Administrator

Since the inception of the SednaX project (the previous name of VFPX) there have been three administrators of the project: Craig Boyd, Rick Schummer, and me. Jim Nelson has been a long-time contributor to VFPX with PEM Editor, Code Reference updates, Thor, and IntelliSenseX. His contributions to the community through VFPX are legendary. Jim also has made numerous suggestions to us over the years that have improved the experience on CodePlex. It only seemed natural that Jim take a more prominent role in the future of VFPX, so we’ve asked him to join us and he’s agreed. Thanks for all you do, Jim.