PRB: "Expected: )" Error Message with Execute Method

    Article ID: Q132141
    Creation Date: 29-JUN-1995
    Revision Date: 19-SEP-1996

    The information in this article applies to:

    • Microsoft Access version 2.0

    SYMPTOMS

    The "Execute Method" topic in the Microsoft Access Help system includes parentheses in the sample syntax. When you enclose the Execute method's source and options arguments in one set of parentheses, you receive the following error message at run time:

       Expected :  )
    
    
    CAUSE

    The sample syntax reads as follows:

       database.Execute(source [,options])
    
    
    It incorrectly includes parentheses around the arguments for the Execute method.

    RESOLUTION

    Remove the parentheses from the syntax of the Execute method so that it reads as follows:

       database.Execute source [,options]
    
    
    The following sample syntax would be correct:

       MyDB.Execute "Update Orders Set Freight=0", DB_SQLPASSTHROUGH
    
    
    REFERENCES

    For more information about the Execute method, search for "Execute," and then "Execute Method (Data Access)" using the Microsoft Access Help menu.


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.
©1997 Microsoft Corporation. All rights reserved. Legal Notices.

Additional reference words: 2.00
KBCategory: kbprg kbdocerr kberrmsg
KBSubcategory: MdlGnrl