1
VB.NETでObjectDataSourceのcommandTimeoutを設定する必要があり、それを行う方法が見つかりません。私はこれをSqlDataSourceで簡単に行うことができますが、私はObjectDataSourceを使用することに制限されています。ObjectDataSourceのcommandTimeoutを設定する方法
ご協力いただければ幸いです。ありがとう
VB.NETでObjectDataSourceのcommandTimeoutを設定する必要があり、それを行う方法が見つかりません。私はこれをSqlDataSourceで簡単に行うことができますが、私はObjectDataSourceを使用することに制限されています。ObjectDataSourceのcommandTimeoutを設定する方法
ご協力いただければ幸いです。ありがとう
回答から取られたhere。
あなたは_commandCollectionに コマンド(複数可)にCommandTimeoutプロパティを設定することで 生成されたコードを編集する必要が強く型付けされたTableAdapterのを使用している場合:
YourDataSet.Designer.cs:
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitCommandCollection() {
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT * FROM dbo.Table";
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
this._commandCollection[0].CommandTimeout = 1000; //Timeout in seconds
}