ActiveReports 18 .NET Edition
Report Authors: Designer Components / Data Binding / Data Binding in Section Reports / Connect to a Data Source / OLEDB Provider
In This Topic
    OLEDB Provider
    In This Topic

    This article explains connecting a Section report to an OLEDB data source.

    Note: The OLEDB model depends on the installed drivers.

    Connect to an OLEDB Data Source

    1. In the designer, select the Data Source icon on the Detail section of the report or click the gray area around the design surface and select the Edit Data Source link in the Properties pane.
    2. In the Report Data Source dialog that appears, select the OLE DB tab to connect to an OLEDB data source.
      Connect to an OLEDB Data Provider
    3. Click the Build button next to the Connection String section to open the Data Link Properties dialog box.
      Data Link Dialog Box
    4. In the Providers tab, specify the OLEDB provider you want to use to connect to the data source. For example, select Microsoft JET 4.0 OLE DB Provider and click the Next button to move to the Connection tab.
      The fields in the Connection tab depends on the chosen OLEDB provider. For more information, see the Configuration Settings for OLEDB Data Source.
    5. To specify the path for the file, click the ellipsis (...) button and navigate to the desired folder on your system. For example, you can connect to the 'NWIND.mdb' sample data source which can be downloaded from GitHub.
      Connection Tab in Data Link Properties dialog box
    6. Click the Test Connection button to see if you have successfully connected to the database.
    7. Then, click the OK button to close the Data Link Properties dialog box.
      The Connection String section displays the generated connection string as shown below:
      Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\NWIND.mdb;Persist Security Info=False
    8. In the Command Timeout field, specify the wait time (in seconds) for a command to execute. The default value is 30 seconds.
    9. In the Query field on the OLE DB tab, enter a SQL query to fetch the required data from the connected database. For example,
      SELECT * FROM Customers
      You can also click the Query Designer button to access the Visual Query Designer for creating SQL queries. For information on how to create a query using the interactive query designer, visit the Visual Query Designer article.
    10. Click the OK button to save the changes.

    Configuration Settings for OLEDB Data Source

    The OLEDB Data Provider provides the following configuration settings in the Report Data Source dialog.

    The Provider tab describes the type of OLEDB provider you want to use for connecting to a data source. You can choose from the following -

    The Connection tab specifies the properties required for accessing the data. The properties in the tab depend upon the OLEDB provider you want to use.

    For Microsoft JET 4.0 OLE DB Provider and Microsoft OLE DB Provider, following properties are available in the Connection tab -

    Setting Description
    Select or enter a database name Enter a server or a file name along with its location.
    Enter information to log on to the database Specify the username and password required to access the database.

    For Microsoft Office 12.0 Access Database Engine OLE DB Provider, Microsoft Office 12.0 Access Database Engine OLE DB Provider, Microsoft OLE DB Provider for ODBC Drivers, Microsoft OLE DB Simple Provider, MS Data Shape, and OLE DB Provider for Microsoft Directory Services, following properties are available in the Connection tab -

    Setting Description
    Enter the data source and/or location of the data Enter a server or a file name along with its location.
    Enter information to log on to server Select whether to use Windows authentication or server authentication which requires a user name and password. Below this field you can also check the Save my password option for future reference.
    Enter initial catalog to use Specify the name of the database you want to connect.

    For Microsoft OLE DB Provider for SQL Server and SQL Server Native Client 11.0, following properties are available in the Connection tab -

    Setting Description
    Select or enter server name Select your server from the drop down list.
    Enter information to log on to the server Select whether to use Windows authentication or server authentication which requires a user name and password. Below this field you can also check the Save my password option for future reference.
    Select the database on the server Select a database from the server or attach a database file.

    The Advanced tab gives access to the initialization properties required by the chosen OLEDB provider.

    Setting Description
    Impersonation Level Set the impersonation level to any of the following options - Anonymous, Delegate, Identify, and Impersonate.
    Protection Level From the drop down, choose Call, Connect, None, Pkt, Pkt Integrity, or Pkt Privacy.
    Connect Timeout Specify the amount of time (in seconds) for a connection to establish.
    Access Permissions Specify the access permissions on the database, such as Read, ReadWrite, Share Deny None, Share Deny Read, and Share Deny Write.
    Note: In case of SQL Server Native Client 11.0 provider, only the Connect Timeout setting is available.

    The All tab lets you view and edit the initialization properties available for the selected OLEDB provider. These properties can differ based on the OLEDB provider you want to use.