Gets or sets the SQL statement or stored procedure to execute.
[Visual Basic]
<Editor(EditorBaseTypeName:="System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName:="FirebirdSql.Data.Firebird.Design.FbCommandTextUIEditor, FirebirdSql.Data.Firebird, Version=1.7.0.0, Culture=neutral, PublicKeyToken=fa843d180294369d"), _
Category(Category:="Datos"), _
DefaultValue, _
RefreshProperties(RefreshProperties:=RefreshProperties.All)>
NotOverridable Public Property CommandText As
String _
[C#]
[Editor(EditorBaseTypeName="System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", EditorTypeName="FirebirdSql.Data.Firebird.Design.FbCommandTextUIEditor, FirebirdSql.Data.Firebird, Version=1.7.0.0, Culture=neutral, PublicKeyToken=fa843d180294369d")]
[Category(Category="Datos")]
[DefaultValue]
[RefreshProperties(RefreshProperties=RefreshProperties.All)]
public
string CommandText {get; set;}
Property Value
The SQL statement or stored procedure to execute. The default value is an empty string ("").
Implements
IDbCommand.CommandText
Remarks
When the CommandType property is set to StoredProcedure, the CommandText property should be set to the name of the stored procedure. The user may be required to use escape character syntax if the stored procedure name contains any special characters. The command executes this stored procedure when you call one of the Execute methods.
The Firebird .NET Data Provider support the question mark (?) placeholder and named parameters for passing parameters to a SQL Statement or a stored procedure.
For example you can do:
SELECT * FROM Customers WHERE CustomerID = @CustomerID
or
SELECT * FROM Customers WHERE CustomerID = ?
See Also
FbCommand Class | FirebirdSql.Data.Firebird Namespace