KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q136263: How to Use the Convert Source Code to Debug Convert Error

Article: Q136263
Product(s): Microsoft FoxPro
Version(s): 
Operating System(s): 
Keyword(s): 
Last Modified: 01-NOV-2001

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual FoxPro for Windows, Professional Edition 
-------------------------------------------------------------------------------

SUMMARY
=======

This article explains how to access the source code of the converter application
to debug a conversion problem. Please note that Microsoft Technical Support will
not support changes made to the source of the converter application.

MORE INFORMATION
================

The converter application (CONVERT.APP) is invoked when you open a FoxPro
version 2.6 project, form, report, or label in Visual FoxPro. CONVERT.APP is
written in Visual FoxPro, and the source code is included with the Professional
Edition of Visual FoxPro. It is located in the TOOLS\CONVERT directory. To edit
it, open the CONVERT.PJX project. The main program is CONVERT.PRG.

Following are two complementary techniques you can use to isolate the source of
errors you might receive while converting files to the Visual FoxPro version 3.0
format.

Use the CONVERT.H Header File
-----------------------------

CONVERT.H is a header file that contains constant definitions. In particular,
CONVERT.H defines the strings that correspond to the error messages the
converter generates. If you receive an error message and want to locate the
source in the application, locate the string in CONVERT.H. Once you have the
constant corresponding to the string, search for it in CONVERT.PRG.

By looking for the constant in CONVERT.H, you can also discover whether the error
is generated by the converter or generated during run time.

View the Source Code of the Converter at Run Time
-------------------------------------------------

You can also view the source code of the converter application at run time. By
default, the converter application turns DEBUG and TRACE off. To be able to
access the Trace and Debug windows while the Converter is running, locate
L_DEBUG and L_DEBUGSUSPEND in CONVERT.H. Change them from false (.F.) to true
(.T.). Then you can open the CONVERT.PRG program in the Trace window to set a
breakpoint.

Modify the _CONVERT system variable to point to the CONVERT.PRG located in
TOOLS\CONVERT. Ensure that the source code is available, and set a path to it so
you can gain access to it in the Trace window. For example, use this code:

     _CONVERT="C:\VFP\CONVERT.PRG"
     SET PATH TO TOOLS\CONVERT

Additional query words: 3.00 VFoxWin

======================================================================
Keywords          :  
Technology        : kbVFPsearch kbAudDeveloper
Version           : :

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.