Name
Recordset.ActiveConnection Property — (Versions 2.0, 2.1, 2.5, 2.6)
Synopsis
Setrecordset.ActiveConnection =connectionrecordset.ActiveConnection = connenctionstring
The ActiveConnection property specifies the Connection object for the current Recordset object.
Datatype
String or a Variant (containing the current Connection object)
Description
The ActiveConnection property can be read to return either a String
or a reference to a Connection object. The ActiveConnection property
cannot be read if the Recordset object is open or if the Recordset
object was created with a Command object (its Source property set to
a Command object). At any other time, the ActiveConnection property
can be set to either a String or a reference to a Connection object.
If a String value is used, then it should be a valid connection
string that could be passed to the ConnectionString property of a
Connection object. You must set the ActiveConnection property before
you attempt to open a Recordset object. Before it is set, the default
value for the ActiveConnection property is a Null
object reference.
If you specify the ActiveConnection as a parameter to the Open method of the Recordset object, the ActiveConnection property will access the same value. If you opened a Recordset object with a Command object as the Source property value, the Recordset object’s ActiveConnection property will access the Command object’s ActiveConnection property value.
See Also
Conection.ConnectionString Property, Recordset.Open ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access