PRB: DDEDATA.PRG Fails with Filename Under Eight Characters

Last reviewed: April 29, 1996
Article ID: Q100439
The information in this article applies to:
  • Microsoft FoxPro for Windows, version 2.5

Summary:

SYMPTOMS

If DDEDATA.PRG is run to establish FoxPro as a dynamic data exchange (DDE) server, the client application will receive the error message "Remote data not accessible. Start application 'DDEDATA.EXE'?" when attempting to initiate a channel to a file with a name less than eight characters long, if an extension is not provided. (The exact wording of the message will vary from one client application to another).

CAUSE

The DDE messaging service adds an extra character to terminate the string that is passed as the topic argument to DDEDATA.PRG. The syntax required by DDEDATA.PRG for the topic in the client's INITIATE action is:

     <path>;TABLE<table name>

The program parses this string so that everything to the right of the word "TABLE" is converted to uppercase and stored in the variable sRowSrc, including the terminating character. The program then tests to see if the table name stored in sRowSrc exists. The extra character is ignored if the table name is eight characters long (the maximum length for a filename) or if the table name includes an extension.

RESOLUTION

Add the following line of code after line 71 in DDEDATA.PRG:

   sRowSrc = LEFT(sRowSrc,LEN(sRowSrc)-1)

This command removes the extra character from the end of the character string stored in sRowSrc.


Additional reference words: FoxWin 2.50
KBCategory: kbprg kbprb
KBSubcategory: FxinteropDde


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.

Last reviewed: April 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.