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. ADO.NET - Inserting a row and getting the ID

ADO.NET - Inserting a row and getting the ID

Scheduled Pinned Locked Moved C#
csharpquestionlearning
3 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.
  • A Offline
    A Offline
    AJ123
    wrote on last edited by
    #1

    Hi There This has got to be an easy one... I am coming to ADO.NET from an ADO background, so i appologise if it comes across as totally stupid! All i want to do is insert a new row into a table and pull back the autonumber primary key assigned to it. What i don't want to have to do is: 1) Fill a Dataset in order to get a DataTable definition. 2) Use stored procedures. Anybody know the answer off the top of their head? Guess i really need to buy a good ADO.NET book. Thanks In Advance Rich

    L 1 Reply Last reply
    0
    • A AJ123

      Hi There This has got to be an easy one... I am coming to ADO.NET from an ADO background, so i appologise if it comes across as totally stupid! All i want to do is insert a new row into a table and pull back the autonumber primary key assigned to it. What i don't want to have to do is: 1) Fill a Dataset in order to get a DataTable definition. 2) Use stored procedures. Anybody know the answer off the top of their head? Guess i really need to buy a good ADO.NET book. Thanks In Advance Rich

      L Offline
      L Offline
      LongRange Shooter
      wrote on last edited by
      #2

      You might get a faster answer if you post this question on the ADO.NET board instead of the C# board.

      A 1 Reply Last reply
      0
      • L LongRange Shooter

        You might get a faster answer if you post this question on the ADO.NET board instead of the C# board.

        A Offline
        A Offline
        AJ123
        wrote on last edited by
        #3

        Good Point! - Thanks Found my answer at : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadonet/html/manidcrisis.asp[^]

        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