ActiveReports 18 .NET Edition
MESCIUS.ActiveReports Assembly / GrapeCity.ActiveReports.Data Namespace / SqlDBDataSource Class
Members Example

In This Topic
    SqlDBDataSource Class
    In This Topic
    Represents a section report data source based on the SqlDB ADO.NET data provider.
    Object Model
    SqlDBDataSource Class
    Syntax
    'Declaration
     
    Public NotInheritable Class SqlDBDataSource 
       Inherits DbDataSource
       Implements IDbConnectionProperties 
    public sealed class SqlDBDataSource : DbDataSource, IDbConnectionProperties  
    Example
    private void rpt_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 rpt_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
    Inheritance Hierarchy

    System.Object
       GrapeCity.ActiveReports.Data.DbDataSource
          GrapeCity.ActiveReports.Data.SqlDBDataSource

    See Also