Tecnologia de la informacion

Solo disponible en BuenasTareas
  • Páginas : 19 (4618 palabras )
  • Descarga(s) : 0
  • Publicado : 19 de noviembre de 2010
Leer documento completo
Vista previa del texto
Microsoft Access DAO Extensions and the Jet Database Engine
Michael Mee
DAO Program Manager, DART Group
Microsoft Corporation

DAO Version 3.0 Overview

Data Access Objects (DAO) Version 3.0 ships with Microsoft® Access 95, Visual Basic® 4, Microsoft Excel 95, and Visual C++® 4. All four products share the same DLLs and functionality. This paper provides the highlights of what changedbetween the DAO 2 in Microsoft Access 2.0 and DAO 3.0.
The biggest change between DAO 2 and DAO 3 was a fundamental architectural one, as the underlying code switched to using OLE Automation. However, this is only really visible to the extent that the identical DAO is shared between so many products. Most new functionality is refinements of existing functionality, with notable exceptions being thenew Errors collection, the bulk data fetch GetRows method of a recordset, and replication features.
Visual Basic users will notice a much larger change in DAO features as they upgrade from version 3 to version 4. However, this paper does not address those differences as many of them will be familiar with the new objects from using them in Microsoft Access 2.

Object Model

The diagram belowshows the DAO 3.0 object model. At this level of granularity, the only change evident is the new collection Errors on the DBEngine object.


Caution: This section is pure geek stuff. Skip to the next section if you don't care about the internals of DAO.
The DAO DLL, Dao3032.dll, implements an in-process 32-bit OLE Automation server that in turn calls the private DLL entrypoints found in Msjt3032.dll. The same DLL supplied with VC++ is used to provide all programmatic access to data in Microsoft Access 95, Visual Basic 4, and Microsoft Excel 95. The DAO DLL includes a type library that describes all the interfaces it contains. Both ANSI and Unicode versions of the interfaces are supplied (external support such as Mfcans32.dll is not required).
Buried in theDao3032.dll is a type library (typelib) that fully describes DAO. This typelib tells Visual Basic for Applications (VBA) what objects, methods, properties, and so forth are valid, which is how VBA knows when to capitalize code correctly (and how to compile it).
All this is a big leap from Microsoft Access 2 and VB3 days where DAO was inextricably entwined with the source code both of Basic and the sourcecode of VB and Microsoft Access. That's why when Microsoft Access 2 came out and the VB compatibility layer was provided, it was able to use the new Jet features via SQL, but not the DAO language additions. This is all in the past now.

Obsolete Objects

One change that you may or may not notice immediately is the removal of the old Table, Dynaset, and Snapshot objects and various propertiesand methods that were associated with those, along with properties and methods that have been replaced by newer functionality. The following table is taken from the DAO Help topic "Obsolete Features in DAO."

|Obsolete feature |Replacement feature |
|FreeLocks|Idle method of the DBEngine object (not needed for Microsoft Access 95 |
| |databases) |
|SetDefaultWorkspace |DefaultUser/DefaultPassword properties of the DBEngine object |
|SetDataAccessOption|IniPath property of the DBEngine object |
|Database.BeginTrans |Workspace.BeginTrans |
|Database.CommitTrans |Workspace.CommitTrans |
tracking img