OdbcCommand.Connection Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the OdbcConnection used by this instance of the OdbcCommand.
public:
property System::Data::Odbc::OdbcConnection ^ Connection { System::Data::Odbc::OdbcConnection ^ get(); void set(System::Data::Odbc::OdbcConnection ^ value); };
public System.Data.Odbc.OdbcConnection Connection { get; set; }
public System.Data.Odbc.OdbcConnection? Connection { get; set; }
member this.Connection : System.Data.Odbc.OdbcConnection with get, set
Public Property Connection As OdbcConnection
Property Value
The connection to a data source. The default is a null value.
Exceptions
The Connection property was changed while a transaction was in progress.
Remarks
You cannot set the Connection, CommandType, and CommandText properties if the current connection is performing an execute or fetch operation.
If you set Connection while a transaction is in progress and the Transaction property is not null, an InvalidOperationException is generated. If you set Connection after the transaction has been committed or rolled back, and the Transaction property is not null, the Transaction property is then set to a null value.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기