ACC1x: Full Path Causes Endless Loop in StartApp() Example

Last reviewed: June 8, 1997
Article ID: Q94110
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1

SUMMARY

Passing the full path of a DDE server to the StartApp() function will cause an endless loop. The function will continue to run, starting up new copies of the specified DDE server, until the user stops the code or the workstation runs out of memory and the code fails.

The function works correctly if the name of the DDE server without the path is used.

MORE INFORMATION

The sample database NWIND.MDB contains a module called Introduction to Programming. Much of the Access Basic code used as examples in the "Microsoft Access Basic: An Introduction to Programming" manual, version 1.0 is included in this module. The sample function StartApp() from page 142 contains a routine that can be used to initiate a DDE channel.

If the DDEInitiate() in the StartApp() function fails, the error handling routine StartApp: attempts to start the server. The error routine then passes control back to the main body of code, where the DDEInitiate is tried again.

If the full path to the DDE server is used when the StartApp() function is called, the DDEInitiate() function will fail, but the Shell() function in the error routine will be successful.

The following is an example of using StartApp() that will cause an endless loop:

   =StartApp("c:\winword\winword.exe","system")

The following is an example that will work correctly:

   =StartApp("winword","system")


Additional query words: excel channel
Keywords : DcmNwd IntpDde kbprg PgmOthr
Version : 1.0 1.1
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


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: June 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.