Firebird ADO.NET Provider SDK Documentation - v1.7

FbCommand.Connection Property

Gets or sets the FbConnection associated with the current command.

[Visual Basic]
<Category(Category:="Comportamiento"), _  DefaultValue(Value:=null)>
Public Property Connection As FbConnection
[C#]
[Category(Category="Comportamiento")]
[DefaultValue(Value=null)]
public FbConnection Connection {get; set;}

Property Value

The connection to a data source. The default is a null value.

Remarks

You cannot set the Connection, CommandType, and CommandText properties if the current connection is performing an execute or fetch operation.

Exceptions

Exception TypeCondition
InvalidOperationExceptionThe Connection property was changed while a transaction was in progress.

See Also

FbCommand Class | FirebirdSql.Data.Firebird Namespace