Showing posts with label Visual FoxPro. Show all posts
Showing posts with label Visual FoxPro. Show all posts

May 24, 2013

FileSystemObject performance issues

By Mike Lewis

In a recent Hex Central article, I explained how you can use the FileSystemObject to read and write large text files in Visual FoxPro. One of the main reasons for doing that is to work with files that would otherwise break VFP's 2 GB limit.

Unfortunately, that benefit comes at a price. In many cases, the FileSystemObject will be a lot slower than using native VFP commands and functions.

April 10, 2013

How to give focus to a FoxPro top-level form at start-up

By Mike Lewis

This is a question I often see in Visual FoxPro forums. An application needs to show a top-level form (typically a log-in screen) at start-up. But when you launch the form, it
appears behind other windows on the desktop. Even if it is at the front, it's not necessarily the active form. So how do you give the form focus programmatically?

March 12, 2013

Southwest Fox 2013 : Dates confirmed; call for speakers issued

Photo: Therese Schummer
By Mike Lewis

Geeks Gatherings have now confirmed that Southwest Fox 2013 will be held on October 17 - 20, at the SanTan Elegante Conference Center in Gilbert, Arizona. For the second year running, the conference will be combined with Southwest Xbase++, a conference which focuses on Alaska Software’s Xbase++.

If you're a serious Visual FoxPro developer, you should consider attending Southwest Fox. I've done that myself, and I can tell you that it really is a terrific event. It's now the leading VFP conference in the United States, and it attracts developers from all over the world.

January 2, 2013

SCOPE_IDENTITY() and remote views in VFP

By Mike Lewis

In a recent Hex Central article, Lynn Evans recommended using the SCOPE_IDENTITY() function to find the primary key of the most recently inserted row in a SQL Server table. That function is a better choice than @@IDENTITY or IDENT_CURRENT(), because it is specific to the session and the scope.

As a Visual FoxPro developer, I often use SCOPE_IDENTITY() when inserting records via SQL Pass-Through (SPT). But I recently found that it doesn't work with remote views. Specifically, if you use a view to insert a row, then use SQLEXEC() to send a call to SCOPE_IDENTITY(), you always get back a NULL - even if the SPT call uses the same connection handle as the view. That's because the two operations occur in different scopes.

December 31, 2012

A new resource for FoxPro developers, courtesy of Doug Hennig

By Mike Lewis

Doug Hennig is a FoxPro developer, and a prolific author and conference speaker. Over the last 16 years, he has written over a hundred articles for FoxTalk, FoxPro Advisor, CoDe, and other VFP-related journals. He has also published many white papers, based on presentations he's given at FoxPro DevCon, South West Fox, and similar events.

Now, for the first time, most of Doug's writings are available on line, all in one place. He has collected together 146 of his articles and papers, and published them on his personal website. Together, they make a valuable resource for VFP developers.

The subject matter ranges from class design to custom dialogs, archiving to anchoring, encryption to Intellisense. They are listed on the site in alphabetical order, and most come with sample code.

It's true that many of the articles are quite old. But, for the most part, the content is still relevant. (On that point, I wish the dates of the articles were shown so that we could have an idea of just how old they are, but that's a minor quibble.)

My thanks to Doug for providing us with this useful resource. I hope that he will continue to publish his work in this way in the years ahead.




August 31, 2012

Hiding the icon in a Visual FoxPro form

By Mike Lewis

A colleague recently asked if it was possible to hide the icon in a VFP form. She was referring to the icon at the left end of the title bar - the one you click to reveal the control menu.

April 16, 2012

Trouble-shoot the build process in VFP

By Mike Lewis

If you get an unexpected error when building your Visual FoxPro application, here's a tip that will help you track down the cause.

April 5, 2012

VFP reports not showing the same data as the preview

By Dan Macleod

Has this happened to you? You preview a report in Visual FoxPro. Everything looks fine. You then print the report by clicking the Print button in the preview window's toolbar. When you do, the data disappears - the printed version of the report is empty.

In theory, that should never happen. The preview and the actual report should always contain the same data. That's the whole point of a preview, after all. But the exact behavior I just described does sometimes occur - and for an unexpected reason.

March 19, 2012

Where can I download Visual FoxPro?

By Mike Lewis

This is one of the most common questions in FoxPro forums and discussion groups. Clearly, a lot of people have heard of Visual FoxPro (VFP), and would like to get their hands on a copy. So they ask where they can download it - the implication being that they want to obtain it for free.

The answer is simple: It can't be done.