Version: 2.5
Used to open an existing Record object, or to create a new file or directory.
The Open method is used to open an existing Record object or to create
a new file or directory.
There are seven optional parameters.
ConnectModeEnum Constants
| Constant | Value | Description |
| adModeRead | 1 | Read-only permission |
| adModeReadWrite | 3 | Read/write permission |
| adModeRecursive | 0x400000 | Sets permissions for children of the Record. Must use with either adModeShareDenyRead or adModeShareDenyWrite. Or must use with adModeShareDenyNone plus any one of adModeRead, adModeReadWrite, or adModeWrite |
| adModeShareDenyNone | 16 | Other users can open a connection with all permissions |
| adModeShareDenyRead | 4 | No other user can open a connection with read permission |
| adModeShareDenyWrite | 8 | No other user can open a connection with write permission |
| adModeShareExclusive | 12 | No other user can open a connection |
| adModeUnknown | 0 | Default, permission not set or determined |
| adModeWrite | 2 | Write-only permissions |
| Constant | Value | Description |
| adCreateCollection | 0x2000 | Create a new Record specified by Source parameter |
| adCreateNonCollection | 0 | Create a new Record of type adSimpleRecord |
| adCreateOverwrite | 0x4000000 | Allows overwrite of existing Record . You must OR this constant with adCreateCollection, adCreateNonCollection, or adCreateStructDoc |
| adCreateStructDoc | 0x80000000 | Create a new Record of type adStructDoc |
| adFailIfNotExists | -1 | Default |
| adOpenIfExists | 0x2000000 | Provider must open existing Record . You must OR this constant with adCreateCollection, adCreateNonCollection, or adCreateStructDoc |
| Constant | Value | Description |
| adDelayFetchField | 0x8000 | Retrieve fields associated with Record only when needed |
| adDelayFetchStream | 0x4000 | Retrieve stream associated with Record only when needed |
| adOpenAsync | 0x1000 | Open in an asynchronous mode |
| adOpenRecordUnspecified | -1 | Default, no options selected |
| adOpenSource | 0x800000 | Opens source of executable script |
Set objRecord = Server.CreateObject("ADODB.Record")
objRecord.ActiveConnection = strConnection
...
objRecord.Open strSourceURL
Set objRecord = Server.CreateObject("ADODB.Record")
...
objRecord.Open strSourceURL, strConnection