Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Alison Balteramp;#039;s Mastering Microsoft Office Access 1002003 [Electronic resources] - نسخه متنی

Alison Balter

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



Getting to Know DBEngine


As mentioned, the DBEngine object refers to the Jet Database Engine, which is at the top of the DAO hierarchy. The DBEngine object contains only two collections: Workspaces and Errors. When referring to the current database, you can use the CurrentDB() function discussed in the next section. When referring to any database other than the current database, you must refer to the DBEngine object, as in Listing 14.47.

Listing 14.47 Accessing the Properties of the DBEngine Object

Sub ReferToCurrentDB()
Dim ws As dao.Workspace
Dim db As dao.Database
Set ws = DBEngine(0)
'Point the Database object at a database
'opened in the current workspace
Set db = ws.OpenDatabase(CurrentProject.Path & "\Chap14Ex.mdb")
'Print the version property of the database
Debug.Print db.Version
End Sub

This code creates a Workspace object variable that points at the current workspace. The OpenDatabase method of the Workspace object is then used to open another database. The version of the database is printed by the routine.


/ 544