ICommandText

This section describes Jet-specific implementation of the ICommandText interfaces. This includes ICommandText::GetCommandText and ICommandText::SetCommandText.

A command object can have only one text command. When the command text is specified through SetCommandText, it replaces the existing command text.

Method Description
GetCommandText Returns the text command set by the last call to SetCommandText.
SetCommandText Sets the command text, replacing the existing command text.

ICommandText::GetCommandText

Returns the text command set by the last call to SetCommandText. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

ICommandText::SetCommandText

Sets the command text, replacing the existing command text. For information on how this interface is implemented, see the OLE DB Programmer’s Reference.

SetCommandText does not alter the value of any properties. That is, ICommandProperties::GetProperties returns the same value for a property regardless of whether it is called before or after SetCommandText and whether SetCommandText succeeded or failed.

Jet supports a maximum of 64,000 bytes in an SQL string.