Sep 2006
Strange error message with Oracle
2006-09Sep-29
The Oracle ODBC driver threw an error message on a completely innocent looking line:
Read More…
Dealing with Outlook references
2006-09Sep-29
When you automate Outlook, you typically create a reference to Outlook.Application and then get the namespace using the GetNamespace() method. Everything you want to do is possible through the Namespace object. loNamespace.Application provides a nice reference back to Outlook. So why would one want to keep the additional reference around?
Read More…
Choosing a folder in Outlook
2006-09Sep-29
When looking around for samples about Outlook automation samples, it seems that most either create items only in the default folders or hardcode the path in the program code. However, in a real world application, the folder in which you create item often has to be configurable. Fortunately, there's actually a function build into MAPI that does this:
Read More…
Opening an e-mail window with GroupWise™
2006-09Sep-27
In most cases, you can open an e-mail editing window using
Read More…
Calling _Execute() from a different thread
2006-09Sep-26
You can only call the _Execute VFP API function from within the same thread that Visual FoxPro uses to load the library. Calling the function from a different thread crashes Visual FoxPro. If you need to execute code originating in a different thread, you can use SendMessage, though. Here's the code for the FLL. First of all, you need a variable to hold the window handle:
Read More…
HWND hWndMain = NULL;Next, you need a function that a VFP application calls to register the handle
There is not enough memory to complete this operation
2006-09Sep-26
When calling an FLL function you get this error messages, when the FLL creates a new string but doesn't specify a string length:
Read More…
Sorting
2006-09Sep-25
You find sorting algorithm in most programming languages, but you have to look hard for an implementation of common sorting algorithms in Visual FoxPro. Of course, Calvin Hsia has some on his blog, but otherthan that it's getting difficult. The most obvious reason is that Visual FoxPro supports sortingnatively for indexes as well as arrays.
Read More…
Record is out of range (#5)
2006-09Sep-24
Something tried to access a record that does not exist in the selected table.
Read More…
Class Factory cannot supply requested class (0x80040111)
2006-09Sep-20
When the Init() method of a VFP COM object returns .F., Visual FoxPro raises this error to the creating application.
Read More…
FRX as a cursor
2006-09Sep-18
You cannot create an FRX file as a cursor using the CREATE CURSOR command, because FRX files containa UNIQUE field which isn't allowed as a field name:
Read More…