04 ConnectFrom - AndrewMB2/Logic-Architect-for-Excel-VBA GitHub Wiki
ConnectFrom method
Create a connection from an existing Workbook OLEDB connection. Returns True if successful, otherwise False.
Applies to
| TableData | ArrData | RsetData | Xdata | XShared |
|---|---|---|---|---|
| ✓ |
Parameters
| Name | Type | Description |
|---|---|---|
| ConnectionName | String | Name of an existing Workbook OLEDB connection. |
| CursorLocation | adCursorLocation enumeration (optional) | Cursor location; if not supplied, the cursor location must be defined in the workbook connection. For more information see this Microsoft webpage. |
Connects the RsetData object to a database using an existing workbook OLEDB connection. Workbook connections can be created using the Excel user interface. It is essential that this is an OLEDB connection - Get and Transform connections are not suitable.
This can be used when connecting to one of the databases not supported by the Connect method.
If the method fails, the error number is stored in the RsetData object's ErrNumber property.