How to connect with other data provider

3 posts, 0 answers
  1. sand
    sand avatar
    2 posts
    Member since:
    Mar 2007

    Posted 19 May 2007 Link to this post

    Sorry i'm quiet in english.. But i got some question.
    How connect report with other data provider such as OLEDB ,MySQL etc.
    I'm cann't find any related subject ..  In your all sample use SqlDataAdapter
    so provide for MS SQL Server.. But in my project I need to uses MySqlConnector.Net
    ,so how ?





  2. Mike
    Mike avatar
    524 posts
    Member since:
    Feb 2007

    Posted 19 May 2007 Link to this post

    In addition to SqlDataAdapter (optimized for SQL Server 2005/Sql Express), you can use OdbcDataAdapter or OleDbDataAdapter to connect to other 3rd party databases, like MySQL.

    Here is a nice online article demonstrating this:
    http://www.aspnet101.com/aspnet101/tutorials.aspx?id=39

    And here is the Data Adapters section from Reporting Help, which might be relevant to your case (same steps below apply for all types of Adapters):

    <quote>
    You can add a data source to a report by setting the DataSource property of the report to the name of a DataAdapter component (such as a SqlDataAdapter, OdbcDataAdapter, or OleDbDataAdapter). For example, to use a SqlDataAdapter to specify the data source for a report, follow these steps:

    You will need a SqlDataAdapter component from the Toolbox. By default, this component is not visible in the design view of a Telerik Report. Right-click the Telerik Reporting 1.0 tab in the Toolbox and select Choose Items.
    In the Choose Toolbox Items dialog box, select the check box for the SqlDataAdapter item. Click OK.
    Drag a SqlDataAdapter component from the Toolbox to anywhere on the report.
    In the Data Adapter Configuration Wizard, click New Connection.
    In the Add Connection dialog box, enter the server name and log on information for your SQL Server. Select or enter a database name.
    Click OK.
    Click Next.
    Select Use SQL Statements.
    Click Next.
    Type a SQL statement that specifies the data for the report. Click Finish.
    Select the Report (to do this easily, click in the box at the upper left where the rulers meet).
    Set the DataSource property of the Report to sqlDataAdapter1.

    </quote>
  3. DevCraft banner
  4. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 22 May 2007 Link to this post

    Hello,

    We have attached a sample project that demonstrates how to use MySQL ADO.NET 2 data provider with the Telerik Reporting.

    Generally, the ADO.NET 2.0 data providers are all used in a similar manner. All data provides come with a standard set of objects. All these objects are derived from base classes mandated from the ADO.NET 2. This way all data provider specific objects have similar and well known interface. The base classes I'm talking about are defined in the System.Data.Common namespace (System.Data.dll) and here are some of the most important:
    • DbConnection
    • DbCommand
    • DbDataAdapter
    • DbDataReader
    A good place to learn more about the ADO.NET 2 data providers is MSDN: http://msdn2.microsoft.com/en-us/library/cy5kfe3c(VS.80).aspx .

    The idea behind the ADO.NET2 data providers is that they simplify their usage and are interchangeable. This means that they all follow the same pattern regardless of your connection to SQL, Oracle, Access, MySQL or other data base. The only thing that you should do is to use the correct set of objects.
     

    All the best,
    Svetoslav
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top