The information in this article applies to:
SUMMARYMFC does not document or directly expose any methods to manipulate the performance parameters of the Jet Database (DB) engine. However, if you are using DAO 3.5, you can gain access to the DB engine from within an MFC application and alter the performance characteristics just for the instance of the Jet engine your application is using. This method allows the user to programatically set performance characteristics, which will apply only to the specific application. For example, the MaxBufferSize could be set during program startup. MORE INFORMATIONTo gain access to the functions that allow manipulation of Jet, you must first get access to the DB engine. The undocumented function AfxDaoGetEngine() returns a pointer to the current instance of the DB engine. The function is found in Daocore.cpp:
The following line of code returns a pointer to the DB engine. No special
header files are required:
Once you have a pointer to the DB engine, the DAO SDK function SetOption()
can be used to set performance parameters. These parameters only affect the
specific instance of the engine for your application. They do not affect
the default Jet performance parameters stored in the registry. The
following code examples show how to change some of the specific parameters:
NOTE: It is necessary to cast the first parameter in the constructor for
the COleVariant in order to avoid the "ambiguous call to overloaded
function" error at compile time.
The following values and their defaults can be changed:
ReferencesNote: The best source for additional information on these settings is the Access 97 Help Files. Search for the topic:Initializing the Microsoft Jet 3.5 Database Engine Driver Additional query words: defaults settings registry
Keywords : kbDAO kbJET kbMFC kbVC500 kbVC600 |
Last Reviewed: August 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |