ACC97: What Is New and Obsolete for DAO in Microsoft Access 97 (160820)



The information in this article applies to:

  • Microsoft Access 97

This article was previously published under Q160820
Moderate: Requires basic macro, coding, and interoperability skills.

SUMMARY

The Microsoft Jet database engine version 3.5 has some functional improvements over earlier versions. This article discusses the enhancements made to Data Access Objects (DAO), the programming interface provided by the Microsoft Jet database engine for accessing and manipulating data in databases.

MORE INFORMATION

New Features

ODBCDirect:
  • ODBCDirect is a new client/server connection mode that establishes a direct connection to an ODBC data source without loading the Jet database engine into memory.

    For more information about ODBCDirect, search the Help Index for "ODBCDirect workspaces," and then view the topic "Use ODBCDirect with Microsoft Access."
Following is a list of new methods and properties for individual Data Access Objects.

DBEngine object:
  • The new SetOption method overrides the registry values for the Microsoft Jet database engine for the duration of the current instance of DAO.
Database object:
  • The new PopulatePartial method synchronizes any changes in a partial replica with the full replica, clears all records in the partial replica, and then repopulates the partial replica based on the current replica filters.
TableDef object:
  • The new ReplicaFilter property returns a value that indicates which subset of records is replicated to that table from a full replica.
QueryDef object:
  • The new MaxRecords property sets or returns the maximum number of records to return from a query.
Relation object:
  • The new PartialReplica property indicates which Relation object should be considered when populating a partial replica from a full replica.
Field object:
  • The new FieldSize property replaces the FieldSize method. Syntactically, their usage is the same; therefore, no changes will be required to existing code.

    NOTE: The DAO FieldSize property is different from the Microsoft Access FieldSize property. The DAO FieldSize property returns the number of bytes used in the database by a field object of type Memo or OLE Object.
All objects:
  • If you want to verify that your application only uses the objects, methods, and properties in the Microsoft DAO 3.5 Object Library, you can clear the Microsoft DAO 2.5/3.5 Compatibility Library check box in the References dialog box, click the Microsoft DAO 3.5 Object Library, and then recompile your application by clicking Compile All Modules on the Debug menu in module Design view.

    For more information about when to reference the Microsoft DAO 3.5 Object Library, search the Microsoft Access 97 Help Index for "object libraries, DAO."

Obsolete Features

The only data access object method from Microsoft Access 7.0 that has been replaced in Microsoft Access 97 is the FieldSize method, which has been replaced with the FieldSize property.

For more information about obsolete features in DAO from Microsoft Access 2.0 or earlier, search the Help Index for "obsolete features in DAO."

REFERENCES

For more information about the new features of DAO, search the Help Index for "DAO, new features," or ask the Office Assistant.

Modification Type:MajorLast Reviewed:9/26/2003
Keywords:kbinfo KB160820