PowerTools ActiveReports for .NET 9.0J
CommandTimeout プロパティ (SqlDBDataSource)
使用例 

試行を終了させてエラーを生成するまでのコマンド実行時の待ち時間を設定するか返します。
構文
'宣言
 
Public Property CommandTimeout As Integer
public int CommandTimeout {get; set;}
使用例
Private void SectionReport1_ReportStart(object sender, System.EventArgs eArgs)
{
    ((GrapeCity.ActiveReports.Data.OleDBDataSource)(this.DataSource)).ConnectionString = @"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks2000;Data Source=TESTING";
    ((GrapeCity.ActiveReports.Data.OleDBDataSource)(this.DataSource)).CommandTimeout = 30;
    System.IO.StringReader sr = new System.IO.StringReader(new System.IO.StreamReader("..\\..\\sqlString.txt").ReadToEnd());
    ((GrapeCity.ActiveReports.Data.OleDBDataSource)(this.DataSource)).SQL = sr.ReadToEnd();
    sr.Close();
}
Private Sub SectionReport1_ReportStart(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.ReportStart
    CType(Me.DataSource, GrapeCity.ActiveReports.Data.OleDBDataSource).CommandTimeout = 30
    CType(Me.DataSource, GrapeCity.ActiveReports.Data.OleDBDataSource).ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AdventureWorks2000;Data Source=TESTING"
    Dim sr As New System.IO.StringReader(New System.IO.StreamReader("..\\..\\sqlString.txt").ReadToEnd())
    CType(Me.DataSource, GrapeCity.ActiveReports.Data.OleDBDataSource).SQL = sr.ReadToEnd
End Sub
参照

関連項目

SqlDBDataSource クラス
SqlDBDataSource メンバ

 

 


©2003-2015 GrapeCity inc. All rights reserved.