DataReader in the code behind.
-
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
-
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
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:
-
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:
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