ComponentOne DataObjects for .NET
SelectCommandText Property (DbTable)

C1.Data.2 Assembly > C1.Data.SchemaObjects Namespace > DbTable Class : SelectCommandText Property
Gets or sets the command text for fetching data used in DataMode = SqlBased.
Syntax
'Declaration
 
Public Property SelectCommandText As System.String
public System.string SelectCommandText {get; set;}
Remarks
Property SelectCommandType determines whether SelectCommandText is a SQL statement or a stored procedure name.

If specified, SelectCommandType/SelectCommandText determine the command that is executed to fetch data.

The command can also be specified dynamically, in code, in C1.Data.C1DataSetLogic.BeforeGenerateSql or C1.Data.C1DataSetLogic.AfterGenerateSql events.

If C1.Data.C1TableLogic.DataAdapter property is set and its SelectCommand property is not empty, it supersedes the SelectCommandText property.

The SelectCommandText property can be specified in a DbTable only for a SQL-based table (DataMode = SqlBased).

In C1DataExpress, in a C1ExpressTable component, specifying this property makes the table SQL-based and clears the DbTableName property.

When this property is set at design time, and a database connection exists, fields are automatically retrieved from the database structure, with user confirmation if it is OK to delete the existing fields.

See Also

Reference

DbTable Class
DbTable Members
C1ExpressTable Class
Bound, SQL-Based and Unbound Tables