BUG: CKSAMPLE.APP Error: Invalid Function Argument Value ...

Last reviewed: February 16, 1996
Article ID: Q112080
The information in this article applies to:
  • Microsoft FoxPro Connectivity Kit for MS-DOS, versions 2.5, 2.5a, 2.5b

SYMPTOMS

When CKSAMPLE.APP starts, it asks for information about how to connect to the data source. If an invalid data source is provided, a WAIT WINDOW with the message "Attempting to connect..." displays, then a system alert window with the following message appears:

   Invalid function argument value, type, or count.

The button choices in the window are Cancel, Suspend, and Ignore.

CAUSE

When the data connection fails, an error parameter of numeric type is passed to CKSAMPLE.APP's error-handling routine (in REPOERRO.SCX), which expects a parameter of character type.

WORKAROUND

Modify the REPOERRO.SCX screen to accept numeric parameters.

Steps to Modify REPOERRO.SCX

  1. In the Command window, type "MODIFY PROJECT CKSAMPLE.PJX" (without the quotation marks).

  2. Select the REPOERRO Screen Set from the list in the CKSAMPLE.PJX window, and then choose the Edit button.

  3. Choose the Edit button again in the next screen, and then choose OK. This opens the Screen Design window.

  4. From the Screen menu, choose Open All Snippets. This opens the Setup snippet.

  5. Locate the last line in the Setup snippet, which contains the following code:

    errMesg = ALLTRIM(errMesg)

  6. Change the last line to the following, which incorporates an IIF() function to handle both character and numeric error parameters:

    errMesg = IIF(TYPE('errMesg')="C",ALLTRIM(errMesg),errMesg)

  7. Close the REPOERRO.SCX Screen Design window.

  8. In the CKSAMPLE.PJX window, choose Build.

  9. In the Select Build Option window, choose the Build Application option, and then choose OK.

  10. In the Enter Application Filename window, type "CKSAMPLE.APP" (without the quotation marks), and then choose Build.

STATUS

Microsoft has confirmed this to be a problem in FoxPro Connectivity Kit versions 2.5, 2.5a, and 2.5b for MS-DOS. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: FoxDos CK 2.50 2.50a 2.50b buglist2.50
buglist2.50a buglist2.50b errmsg err msg sql server
KBCategory: kbprg kberrmsg kbbuglist
KBSubcategory:


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: February 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.