Compartilhar via


OLEDBConnection.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 OLEDBConnection
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 SQLproperty, 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

OLEDBConnection Interface

OLEDBConnection Members

Microsoft.Office.Interop.Excel Namespace