ActiveReports 8
CommandTimeout Property
See Also  Example
GrapeCity.ActiveReports.v8 Assembly > GrapeCity.ActiveReports.Data Namespace > OleDBDataSource Class : CommandTimeout Property

Glossary Item Box

Sets or returns the amount of time to wait while executing a command before terminating the attempt and generating an error.

Syntax

Visual Basic (Declaration) 
Public Property CommandTimeout As System.Integer
C# 
public System.int CommandTimeout {get; set;}

Remarks

When using this property with the OleDBDataSource, you need to verify with the provider that it supports the command timeout settings. Some of them do not. This is provider-specific, so we are unable to provide a list of working providers.

Example

C#Copy Code
private void detail1_Format(object sender, System.EventArgs eArgs)
{    
    rptSubBM rpt = new rptSubBM();    
    GrapeCity.ActiveReports.Data.OleDBDataSource subDS = new GrapeCity.ActiveReports.Data.OleDBDataSource();  
    subDS.CommandTimeout = 30;  
    subDS.ConnectionString = ((GrapeCity.ActiveReports.Data.OleDBDataSource)(this.DataSource)).ConnectionString;    
    subDS.SQL = "Select * from products where categoryID = " + m_categoryID;    
    rpt.DataSource = subDS;    
    ctlSubReport.Report = rpt;
}
Visual BasicCopy Code
Private Sub Detail1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles Detail1.Format
    Dim rpt As New rptSubBM()
    Dim subDS As New GrapeCity.ActiveReports.Data.OleDBDataSource()
    subDS.CommandTimeout = 30
    subDS.ConnectionString = CType(Me.DataSource, GrapeCity.ActiveReports.Data.OleDBDataSource).ConnectionString    
    subDS.SQL = "Select * from products where categoryID = " + m_categoryID
    rpt.DataSource = subDS    
    Me.ctlSubreport.Report = rpt 
End Sub

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also