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. ASP.NET
  4. DataReader in the code behind.

DataReader in the code behind.

Scheduled Pinned Locked Moved ASP.NET
businessquestion
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.
  • T Offline
    T Offline
    ToddHileHoffer
    wrote on last edited by
    #1

    So I am working a on a new application. It is rather small, but critical. The maintenance section of the program has about 3 users with about 15 users of the display. Anyway, I have a few pages that do simple CRUD operations via some stored procedures. Personally, I am content to use a datareader in the code behind to load the form with data that will be edited. However, I know some developers cringe at the thought of using a datareader in the code behind. Anyone have an opinion on this?

    I didn't get any requirements for the signature

    D 1 Reply Last reply
    0
    • T ToddHileHoffer

      So I am working a on a new application. It is rather small, but critical. The maintenance section of the program has about 3 users with about 15 users of the display. Anyway, I have a few pages that do simple CRUD operations via some stored procedures. Personally, I am content to use a datareader in the code behind to load the form with data that will be edited. However, I know some developers cringe at the thought of using a datareader in the code behind. Anyone have an opinion on this?

      I didn't get any requirements for the signature

      D Offline
      D Offline
      David Mujica
      wrote on last edited by
      #2

      IMHO, the datareader is good for processing lots of rows, but if you want to make your life simple, try using a dataset or datatable. You can bind it directly to a Gridview in a couple of lines of code and Bam ! The stuff just works. I'm still learning, so what the h3ll do I know. :cool:

      T 1 Reply Last reply
      0
      • D David Mujica

        IMHO, the datareader is good for processing lots of rows, but if you want to make your life simple, try using a dataset or datatable. You can bind it directly to a Gridview in a couple of lines of code and Bam ! The stuff just works. I'm still learning, so what the h3ll do I know. :cool:

        T Offline
        T Offline
        ToddHileHoffer
        wrote on last edited by
        #3

        I agree. I use datatables whenever I do databinding (for grids or lists etc). But when coding for a single row, that is when I use the datareader.

        I didn't get any requirements for the signature

        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