Microsoft KB Archive/100439

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 09:14, 20 July 2020 by X010 (talk | contribs) (Text replacement - ">" to ">")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.