Multiple DataSets : Any Better Approach ??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kaveri

    Multiple DataSets : Any Better Approach ??

    Currently we use a data adapter and a dataset for fetching
    data from multiple data source.
    Once we populate the data from each data source we
    merge all datasets into a single dataset.
    Hence if there are 50 data retrieved from 50 different
    sources, we will have to have 50 adapters and datasets.

    We need to know if there are any better approach to this
    solution ?

    Any suggestions will be highly Appreciated.

  • Scott Meddows

    #2
    Multiple DataSets : Any Better Approach ??

    Personally, I would think that you'd have a few different
    data adapters. Depends on your data sources. You can
    always close the data adapter and change the connection
    string to point to your new datasource. then just fill
    the dataset. Once it's in the dataset it's just data.
    Not specific to any DB.

    But that could eat up a lot of memory! Have you
    considered transforming them into one nice database using
    DTS on SQL server? That way it would be a LOT faster.
    And you can create indexes on the data much easier (in
    your DTS package)
    [color=blue]
    >-----Original Message-----
    >Currently we use a data adapter and a dataset for[/color]
    fetching[color=blue]
    >data from multiple data source.
    > Once we populate the data from each data source we
    >merge all datasets into a single dataset.
    > Hence if there are 50 data retrieved from 50 different
    >sources, we will have to have 50 adapters and datasets.
    >
    >We need to know if there are any better approach to this
    >solution ?
    >
    >Any suggestions will be highly Appreciated.
    >
    >.
    >[/color]

    Comment

    • Jay B. Harlow [MVP - Outlook]

      #3
      Re: Multiple DataSets : Any Better Approach ??

      Kaveri,
      The only thing I would seriously consider changing it the number of DataSet.
      Why do you have more than 1?

      I'm assuming each DataAdapter is unique to a distinct table. If the tables
      are the same & just different machines, then I would probably have a single
      DataAdapter also, and change the connection as Scott suggests.

      David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS press
      provides a plethora of information on Data Adapters, Data Sets and every
      thing else ADO.NET!

      Hope this helps
      Jay

      "Kaveri" <dinesh4977@hot mail.com> wrote in message
      news:08da01c36d e6$8208b420$a30 1280a@phx.gbl.. .[color=blue]
      > Currently we use a data adapter and a dataset for fetching
      > data from multiple data source.
      > Once we populate the data from each data source we
      > merge all datasets into a single dataset.
      > Hence if there are 50 data retrieved from 50 different
      > sources, we will have to have 50 adapters and datasets.
      >
      > We need to know if there are any better approach to this
      > solution ?
      >
      > Any suggestions will be highly Appreciated.
      >[/color]


      Comment

      • Scott M.

        #4
        Re: Multiple DataSets : Any Better Approach ??

        You shouldn't need 1 dataset for each dataAdapter. When you call the fill
        method of a given dataAdapter, tell it to fill the same dataSet you've
        already established, just specify a new table name for the dataTable that
        will be created.

        Now, you won't have more than one DataSet in the first place and you won't
        have to merge 50 DS's into one.


        "Kaveri" <dinesh4977@hot mail.com> wrote in message
        news:08da01c36d e6$8208b420$a30 1280a@phx.gbl.. .[color=blue]
        > Currently we use a data adapter and a dataset for fetching
        > data from multiple data source.
        > Once we populate the data from each data source we
        > merge all datasets into a single dataset.
        > Hence if there are 50 data retrieved from 50 different
        > sources, we will have to have 50 adapters and datasets.
        >
        > We need to know if there are any better approach to this
        > solution ?
        >
        > Any suggestions will be highly Appreciated.
        >[/color]


        Comment

        Working...