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. Database & SysAdmin
  3. Database
  4. From one database to another (DataSets & .NET)

From one database to another (DataSets & .NET)

Scheduled Pinned Locked Moved Database
databasequestioncsharpsql-serversysadmin
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.
  • J Offline
    J Offline
    Jon Rista
    wrote on last edited by
    #1

    I have what I think is a fairly simple procedure, but its currently not working. I'm hoping someone here is an ADO.NET guru who has tried the same thing, and can help me out. :) Here is the situation: Process: =============== I am developing a small app to post new, incomming data to an existing database. The database is a live, production database, and there is the possability that duplicate information may come through in the new incomming data. I've set up a processing database, where I insert the new data in temporary tables, and select and insert the data from the live database into other temporary tables. I post the new data to the same tables as the temp live data, perform some business logic, and then perform an update on the live database. Setup: =============== I am using ADO.NET with a single DataSet to get the data from the live database into the temp processing tables. I use the same dataset to insert the new data into other temp tables. All the DataTables have primary keys configured. There are DataAdapters configured for importing the live data, with proper DataTableMappings, each of which have proper DataColumnMappings. There are DataAdapters configured for importing the new data, with proper DataTableMappings and DataColumnMappings. The databases are both Microsoft Access databases, although I have tried with Microsoft SQL Server, with the same results. Issues: =============== When I execute the application, it imports the live data, imports the new data, and performs some basic business rules. After the rules are done, I need to update the live database. The primary keys on the DataTables filter out any duplicate data, so when I import the new data, only new information is added. The business logic changes some of the existing live data, as well as some of the new data. When this is all said and done, and I try to update the live database, it doesn't update properly. I've never tried to use a single DataSet with two different data sources before. This particular situation requires that both data sources be updated, inserted into, and selected from a couple times. Question: =============== How does one update #1 data source with data from #2 data source using a single DataSet, and be able to do the opposite, update the #2 data soource with data from #1 data source? Thanks for any help, and I hope I have provided enough information.

    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