2012-04-05 2 views
1

에 대한 CommandTimeout이를 설정하는 방법은 VB.NET에 ObjectDataSource를위한 CommandTimeout이를 설정해야하고 내가 그 일을 어떤 방법을 찾을 수 없습니다. 이 작업은 SqlDataSource에서 쉽게 수행 할 수 있지만 ObjectDataSource를 사용하는 것으로 제한됩니다.는 ObjectDataSource를

도움을 주시면 감사하겠습니다. 감사합니다

답변

0

답변 here에서 가져옵니다.

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 
     } 
: 당신이 강력한 형식의 TableAdapter에를 사용하는 경우

당신은 _commandCollection에서 명령 (들)의 CommandTimeout이 속성을 설정하여 생성 된 코드를 수정해야

관련 문제