Previous Topic

Next Topic

Inhoudsopgave

Book Index

Databases Property

Property Property DataBases( DBAdmin_Alias: String ): Database_Object (R)

Description

Creates an object that manages data handling within a specified database.

Remarks

The DataBases property allows you, for example, to access a custom database. Note that you always have to close your connection to the database using the Close procedure.

Parameters

Result

Returns a DataBase object.

Example

Sub Main()

' Initiate the variables

Dim DB

Dim Qry

' Create an entry to custom database CustomDBC

Set DB = Application.DataBases("CustomDB")

' Create a read-only query within the requested database

Set Qry = DB.CreateQuery( "Select CountryCode, Description from Country" )

' Open the created query, carry out a lookup and close the query

Qry.Open

Qry.Lookup

Qry.Close

End Sub