Microsoft KB Archive/139781

= PRB: Converted Trans.scx 2.x Sample Must Be Modified to Work =

Article ID: 139781

Article Last Modified on 2/10/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q139781



SYMPTOMS
The Following error is generated when you try to run the Trans.app sample application:

No update tables are specified. Use the Tables property of the cursor. Press any key to cleanup and exit...

Trans.app is a FoxPro version 2.x sample program that must be converted before it will run in Visual FoxPro, but even after conversion, the error occurs.



CAUSE
The ReadShow event handler contains a call to the REFRESH user-defined function (UDF). Visual FoxPro now includes a built-in function by the same name that takes precedence over the UDF.



RESOLUTION
Modify the converted application, or revert to the 2.x version, make the modifications there, and reconvert.

To modify the 2.x version of Trans.pjx:

 Start FoxPro version 2.x. Type the following command in the Command window:

MODIFY SCREEN Trans.scx.

  Double-Click the Trans_Type popup, and edit the VALID clause. Change this line: = refresh to this line: = myrefresh  Open the Cleanup/Procs code snippet. Rename the REFRESH function in the Cleanup code to MYREFRESH.  Open the Read Show snippet. Change this line: = refresh to this line: = myrefresh  Close FoxPro version 2.x, and start Visual FoxPro.</li> Reconvert the application.</li> Build and run the Trans.app application.</li></ol>

To modify the already converted Visual FoxPro 3.0 version:

<ol> Start Visual FoxPro.</li> Modify the Trans.scx form. Select the frsTrans1 formset in the object popup of the Properties window. Click the Methods tab.</li>  Edit the ReadShow method. Change this line: = refresh to this line: = myrefresh </li> Select cboTrans_Type19 in the object popup of the Properties window. Click the Methods tab.</li>  Edit the Valid event. Change this line: = refresh to this line: = myrefresh </li> Edit the Trans.spr program from Trans.pjx. Rename the REFRESH function in Trans.spr to MYREFRESH.</li> Build and run the Trans.app application.</li></ol>

<div class="status_section">

STATUS
This behavior is by design.

<div class="moreinformation_section">

Steps to Reproduce Behavior

 * 1) Transport the FoxPro 2.x version of Trans.pjx to Visual FoxPro.
 * 2) Build Trans.pjx into an application using Visual FoxPro.
 * 3) Run Trans.app. This generates the error.

Additional query words: VFoxWin

Keywords: KB139781

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.