ADO ActiveCommand Property

Home | About me | EXCEL VB Programming (XL97-2003) | ACCESS Programming | EXCEL VB.Net Programming | EXCEL Spreadsheet Functions Material Management  |  Guestbook
 

ADO ActiveCommand Property

Returns a variant that is the Command object associated with the Recordset object.

The ActiveCommand property returns a variant that contains the Command object used to create the Recordset object.

This is a convenient way to find the associated Command object even if you only have the resultant Recordset. However, if the Recordset was not created by a Command object, then a Null object is returned. You can use this property even after the Recordset has been closed.

Syntax

objRecordset.ActiveCommand
 

Example

strCmdText = objRecordset.ActiveCommand.CommandText
strCmdType = objRecordset.ActiveCommand.CommandType