FIX: Domain Functions Available Only Within SQL StatementLast reviewed: October 30, 1997Article ID: Q102479 |
3.00
WINDOWS
kbprg kbbuglist kbfixlist
The information in this article applies to: - Standard and Professional Editions of Microsoft Visual Basic programming system for Windows, version 3.0
SYMPTOMSIf you try to use the domain aggregate function examples provided in the Microsoft Visual Basic version 3.0 for Windows Help file, you will receive this error message:
Reference to undefined Function or array CAUSEThe examples for the domain aggregate functions are incorrect. The domain aggregate functions, like the SQL aggregate functions, can be used only within an SQL statement.
WORKAROUNDUse the domain aggregate functions within an SQL statement, as in the following example. Enter the following as one, single line:
Set Dn = Db.CreateDynaset("Select DAvg(""AU_ID"", ""AUTHORS"") FROM Authors") STATUSMicrosoft has confirmed this to be a bug in the Visual Basic version 3.0 Help file. This problem has been corrected in Visual Basic version 4.0.
MORE INFORMATION
Step-by-Step ExampleThe following example demonstrates how to print to the form an average of all the AU_ID values in the Authors table from the BIBLIO.MDB database that comes with Microsoft Visual Basic version 3.0 for Windows:
The Following are the Domain Aggregate Functions:
DAvg DCount DFirst DLast DLookup DMin DMax DStDev DStDevP DSum DVar DVarP |
Additional reference words: buglist3.00 3.00 fixlist4.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |