Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Fill a DataSet from a data source and update another data source

Fill a DataSet from a data source and update another data source

Scheduled Pinned Locked Moved C#
csharpdatabasesql-serverdesignsysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kamran Zafar
    wrote on last edited by
    #1

    My task is to fill a DataSet from a data source and update another data source in C#. For example I have two databases in SQL Server (i.e. db1 and db2). I have table named ProdMkt_Contrib_Link in db1 with following columns: ProdMkt_Contrib_Link -------------------- ProdMktContributorID (PK) ProductMarketID Priority Inactive Contrib_Type_Override ProdMkt_Contrib_Link_ID The above columns data should be mapped/sync to the table named ProdMktContribLink in db2: ProdMktContribLink ------------------ ProdMktContributorID (PK) ProductMarketID Priority InactiveFG ContribTypeOverRide AcumenProdMktContribLinkID Note: The table name and few column name are different Suppose few records are added and few are updated in the db1.ProdMkt_Contrib_Link table. I have filled the typed DataSet (DS1) with db1.ProdMkt_Contrib_Link (this contains only added and updated records) ans also filled the another DataSet (DS2) with db2.ProdMktContribLink (this contains all records). Now I want that DS1 should be sync with the DS2. That is, the added records should be added to the DS2 table rows and also updated records should be updated to the DS2 table rows. How can I achieve this in c#. Please suggest any good design or sample code. Thanks, Kamran

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups