Microsoft KB Archive/100439: Difference between revisions

From BetaArchive Wiki
m (Text replacement - """ to """)
m (Text replacement - "<" to "<")
Line 21: Line 21:
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:
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:


<pre>    &lt;path&gt;;TABLE&lt;table name&gt;
<pre>    <path&gt;;TABLE<table name&gt;
</pre>
</pre>
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.
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.

Revision as of 09:06, 20 July 2020

PRB: DDEDATA.PRG Fails with Filename Under Eight Characters

ID: Q100439

2.50 WINDOWS kbprg kbprb

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

Keywords          : FxinteropDde 
Version           : 2.50
Platform          : WINDOWS

Last Reviewed: April 30, 1996
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.