Share via


ODBCConnection.CommandText Property

Returns or sets the command string for the specified data source. Read/write Object.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property CommandText As Object
    Get
    Set
'Usage
Dim instance As ODBCConnection
Dim value As Object

value = instance.CommandText

instance.CommandText = value
Object CommandText { get; set; }

Property Value

Type: System.Object
Object

Remarks

You should use the CommandText property instead of the SQL property, which now exists primarily for compatibility with earlier versions of Microsoft Excel. If you use both properties, the CommandText property's value takes precedence.

The CommandType property describes the value of the CommandText property.

See Also

Reference

ODBCConnection Interface

ODBCConnection Members

Microsoft.Office.Interop.Excel Namespace