ADO 2.5 API Reference

Open Method (ADO Record)

Opens an existing Record object, or creates a new item represented by the Record (such as a file or directory).

Syntax

Open Source, ActiveConnection, Mode, CreateOptions, Options, UserName, Password

Parameters

Source
Optional. A Variant that may represent the URL of the entity to be represented by this Record object, a Command, an open Recordset or another Record object, a string containing a SQL SELECT statement or a table name.
ActiveConnection
Optional. A Variant that represents the connect string or open Connection object.
Mode
Optional. A ConnectModeEnum value, whose default value is adModeUnknown, that specifies the access mode for the resultant Record object.
CreateOptions
Optional. A RecordCreateOptionsEnum value, whose default value is adFailIfNotExists, that specifies whether an existing file or directory should be opened, or a new file or directory should be created. If set to the default value, the access mode is obtained from the Mode property. This parameter is ignored when the Source parameter doesnt contain a URL.
Options
Optional. A RecordOpenOptionsEnum value, whose default value is adOpenRecordUnspecified, that specifies options for opening the Record. These values may be combined.
UserName
Optional. A String value that contains the user ID that, if needed, authorizes access to Source.
Password
Optional. A String value that contains the password that, if needed, verifies UserName.

Remarks

Source may be:

If the Record object represents an entity that cannot be accessed with a URL (for example, a row of a Recordset derived from a database), then the values of both the ParentURL property and the field accessed with the adRecordURL constant are null.

Note   URLs using the http scheme will automatically invoke the Microsoft OLE DB Provider for Internet Publishing. For more information, see Absolute and Relative URLs.

See Also

Example | Example

Open Method (ADO Connection) | Open Method (ADO Recordset) | Open Method (ADO Stream) | OpenSchema Method

Applies To: Record Object

© 1998-2003 Microsoft Corporation. All rights reserved.