Object Libraries

A Microsoft Access database consists of various types of objects stored in different object libraries to display, store, or manage data with the Visual Basic for Applications language. In this chapter you will be accessing objects, properties, and methods from several of the libraries listed below.

The Microsoft Access 10.0 Object Library provides objects that are used to display data and work with the Microsoft Access 2002 application. This library is stored in the MSACC10.OLB file and can be found in the C:\Program Files\Microsoft Office\Office folder. After setting up a reference to this library in the References dialog box (this is covered in the next section), you will be able to access this library's objects, properties, and methods in the Object Browser (see Figure 15-1).

The Microsoft Access DAO 3.6 Object Library provides Data Access Objects (DAO) that allow you to determine the structure of your database and manipulate data using VBA. This library is stored in the DAO360.DLL file and can be found in the C:\Program Files\Common Files\Microsoft Shared\DAO folder. After setting up a reference to this library in the References dialog box (covered in the next section), you will be able to access the library's objects, properties, and methods in the Object Browser (see Figure 15-2).

ï Object Biowser

WFIE3

BiUM I. I tl

i

Mill

Classes

[Members of'<globafs>'

g i ^lobais»

Application E§* Assistant eS* Broken Reference Ef? Build

EÉ? CodeC ontexJObjecl eS1 codeData E§* CodeProject ES1 COMAddirts Ef CommandBars e£? Curre ntData e£* Curre ntObjeclName

â zi

S3 AtcessObjecl AccessObjeclProper AccessObjeclProper AllDataAccessPagei Sä AIIDatabaseDiagrarr S3 AiiForms Sä Al Functions S3 AHMacros AIIModules AIIQueries tÖ AllReports

Library Access _*] C:ïProgram FiSesTMicrosoft Off iceKtf f ice1 OWSACC.OLB j Microsoft Access 10.Ü Object Ltcaiy —I

J

Figure 15-1: Library Access

Ï Object Browser

- (ni xl

IKMMH

m.

n -i i i-i ti

P

"71 »1*1

Ctasses

Members of'<globafs>'

© i^lobals»

N

Ef DefauitPassword

1

S3 Connection

1

g? DefaultType

tîi Connections

1

DefaultUser

¿S& Container

eS* Errors

¡¿3 Containers

Eff inlPath

S3 Database

eS1 LoginTimeout

S3 Databases

eSP Properties

DBEngine

á* SysiemDB

S3 Document

eS1 Version

Documents

ii? Workspaces

Error

=0 BeginTrans

Errors

CornmiiTrans

Library DAO

C:ïProgram FfeslCommon FfesWicrosoft Shsredï>A0>DA036Û.DLL |

Microsoft DAO 3.6 Object Lforsry

Figure 15-2: Library DAO

Figure 15-2: Library DAO

The Microsoft ActiveX Data Objects 2.5 Library (ADO) provides ActiveX Data Objects (ADO) and allows you to access and manipulate data using the OLE DB provider. ADO objects make it possible to establish a connection with a data source and read, insert, modify, and delete data in an Access database. This library is stored in MSA-DO15.DLL and can be found in the C:\Program Files\Common Files\system\ado folder. After setting up a reference to this library in the References dialog, you will be able to access this library's objects, properties, and methods in the Object Browser (see Figure 15-3).

The Microsoft ADO Ext. 2.5 for DDL and Security (ADOX) stores objects that allow you to define the database structure and security. For example, you can define tables, indexes, and relationships, as well as create and modify user and group accounts.

This library is stored in MSADOX.DLL and can be found in the C:\Program Files\Common Files\System\ado folder. After setting up a reference to this library in the References dialog box, you will be able to access this library's objects, properties, and methods in the Object Browser (see Figure 15-4).

The Microsoft Jet and Replication Objects 2.6 Library (JRO) contains objects that are used in the replication of a database. This library is stored in MSJRO.DLL and can be found in the C:\Program Files\Common Files\System\ado folder. After setting up a reference to this library in the References

£ Object Biowser

H

RE3

|[aqodb

Fl <1-1 -1H f 1

1

"3 JiliU

Classes

Members of'<globafs>'

© kglobals*

li adAddNew

1

Command

1

3 adWfecWMChapters

ISSJ Connection

¿J adMectCurrent

Error

© adWfeclOroup

¡¿3 Errors

^J adApproxPosltlon

jjfi Field

Zi adArray

Fields

m adAsync connect

JsSi Parameter

Zi adAsync Execute

Parameters

@ adAsync Fetch

Properties

til adAsync FetchNonBlocking

Property

±i adBiglnt

Éi

[Jffl Record_

tlJ adBinaty

Library ADODB

C:^Program FtesVUommon Ffes1sysiein\adoïmsado1 S.dlS

\

Microsoft ActiveX Data Objects 2.5 Library

Figure 15-3: Library ADODB

Figure 15-3: Library ADODB

Figure 15-4: Library ADOX

Figure 15-4: Library ADOX

Figure 15-5: Library JRO

dialog box, you will be able to access this library's objects, properties, and methods in the Object Browser (see Figure 15-5).

The Visual Basic for Applications Object Library (VBA) provides many VBA objects, functions, and methods that allow you to access the file system, work with date and time functions, perform mathematical and financial computations, interact with users, convert data, and read text files. This library is stored in the VBE6.DLL file located in the C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6 folder. The reference to this library is automatically set when you install Microsoft Excel 2002. This library is shared between all Office 2002 applications (see Figure 15-6).

Classes

Members of'<globafs>'

G i^lobals»

gf Calendar

ê

Collection

g? Date

IS Errûbject

^ Datei

¿S Global

eS* Now

««£ ColorConstants

eS? Ttma

Constants

gf Trme$

conversion

ES1 Timer

DateTime

g§* Userf orms

& FileSystem

Abs

Financial

^ AppAcfivate

Information

Ä Asc

Interaction

JLJ

AscS

c:\Program Fh&î^Cammûn FtesWIicrcreoft ShsredWEmVBߣ IVBEË.DLL VtiiiH Basic For Applicaliars

Library VBA

c:\Program Fh&î^Cammûn FtesWIicrcreoft ShsredWEmVBߣ IVBEË.DLL VtiiiH Basic For Applicaliars id

Figure 15-6: Library VBA

Was this article helpful?

0 0

Post a comment