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. Web Development
  3. Save multiple records

Save multiple records

Scheduled Pinned Locked Moved Web Development
2 Posts 2 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.
  • P Offline
    P Offline
    Pallavi Bhoite
    wrote on last edited by
    #1

    Hi all , In my web site , at one place i have to store multiple records .. in 2 tables at a time so i am using transaction for it. so ...my code is like begin transaction ExecuteNonQuery - for first table ExecuteNonQuery - for second table commit or rollback i run this in loop for multiple records ... can any one give me better option i want to acheive 2 goals 1. save multiple records at a one time .. no loop 2. use transaction

    pallavi

    C 1 Reply Last reply
    0
    • P Pallavi Bhoite

      Hi all , In my web site , at one place i have to store multiple records .. in 2 tables at a time so i am using transaction for it. so ...my code is like begin transaction ExecuteNonQuery - for first table ExecuteNonQuery - for second table commit or rollback i run this in loop for multiple records ... can any one give me better option i want to acheive 2 goals 1. save multiple records at a one time .. no loop 2. use transaction

      pallavi

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Write a proc that does the insert for multiple records. XML is the best way to pass multiple records, OpenXML can turn that into a table, which you then insert into your main DB.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      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