Open Method (ADO Record)
Opens an existing Record object, or creates a new item represented by the Record, such as a file or directory.
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 that contains an SQL SELECT statement or a table name.
Optional. A Variant that represents the connect string or open Connection object.
Optional. A ConnectModeEnum value that specifies the access mode for the resultant Record object. Default value is adModeUnknown.
Optional. A RecordCreateOptionsEnum value that specifies whether an existing file or directory should be opened, or a new file or directory should be created. Default value is adFailIfNotExists. If set to the default value, the access mode is obtained from the Mode property. This parameter is ignored when the Source parameter does not contain a URL.
Optional. A RecordOpenOptionsEnum value that specifies options for opening the Record. Default value is adOpenRecordUnspecified. These values can be combined.
Optional. A String value that contains the user ID that, if it is required, authorizes access to Source.
Optional. A String value that contains the password that, if it is required, verifies UserName.
Source may be:
A URL. If the protocol for the URL is http, the Internet Provider will be invoked by default. If the URL points to a node that contains an executable script (such as an .ASP page), a Record that contains the source instead of the executed contents is opened by default. Use the Options argument to modify this behavior.
A Record object. A Record object opened from another Record will clone the original Record object.
A Command object. The opened Record object represents the single row returned by executing the Command. If the results contain more than a single row, the contents of the first row are placed in the record and an error may be added to the Errors collection.
An SQL SELECT statement. The opened Record object represents the single row returned by executing the contents of the string. If the results contain more than a single row, the contents of the first row are placed in the record and an error may be added to the Errors collection.
A table name.
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), the values of both the ParentURL property and the field accessed with the adRecordURL constant are null.