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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Updating many rows with ADO.net

Updating many rows with ADO.net

Scheduled Pinned Locked Moved Database
databasecsharpquestionannouncement
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.
  • D Offline
    D Offline
    Drathmar
    wrote on last edited by
    #1

    Right now I have a program that queries a database and saves the data into a a strongly typed dataset Then I perform various calculations on each record and fill in 5 null fields with data Lastly, I click upload and it does a for loop, for each data row and calls the update method to update the database with the calculated values. This works all fine and dandy, except the upload part is rather slow. it looks something like DataAdapter.StoredProcedureUpdate(Primary key, NewValue1, NewValue2, NewValue3, NewValue4, NewValue5) I'm guessing that the upload part is slow because its repeating a process where 3/4 of the work done is not the update function 1. creating the connection 2. connecting and authnicating 3. calling the update procedure 4. closing the connection I'm still somewhat new to ADO.NET so I'm not quite sure if its actually doing this. Does anyone have some good suggestions on a better method? Perhaps a way to call a bulk update through ADO.net or SQL?

    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