XL7: SQL PassThrough Example in Help Has Incorrect Example

Last reviewed: March 27, 1997
Article ID: Q140702
7.00 WINDOWS kbprb kbdocerr

The information in this article applies to:

  • Microsoft Excel for Windows 95, version 7.0

SUMMARY

In Data Access Object (DAO) Reference Help, the "Using SQL PassThrough with DAO" topic contains an incorrect code example under the "To create and execute an SQL pass through query from code" heading.

MORE INFORMATION

The incorrect code example reads:

   Set dbs = OpenDatabase("Salary.mdb" _
        dbs.Connect = "ODBC;dsn=Accounting;uid=Dagny;"& _
        pwd=Bandit;database=Payroll;"
   dbs.Execute "Update UPDATE Employees SET Salary = Salary * 1.1;", _
        dbSQLPassThrough

The correct syntax for this example is shown below:

   Set dbs = OpenDatabase("Salary.mdb")
   dbs.Connect = "ODBC;dsn=Accounting;uid=Dagny;" & _
        "pwd=Bandit;database=Payroll;"
   dbs.Execute "UPDATE Employees SET Salary = Salary * 1.1;", _
        dbSQLPassThrough

REFERENCES

For more information about Using SQL PassThrough With DAO, choose the Index tab in Help and type:

   sql, pass-through queries


KBCategory: kbprb kbdocerr
KBSubcategory:

Additional reference words: 7.00
Keywords : kbdocerr kbprb
Version : 7.00
Platform : WINDOWS


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