Microsoft KB Archive/140702

= XL7: SQL PassThrough Example in Help Has Incorrect Example =

PSS ID Number: 140702

Article Last Modified on 10/20/2000

-

The information in this article applies to:


 * Microsoft Excel for Windows 95 7.0

-



This article was previously published under Q140702





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



STATUS
