Feature suggestion

Topics: Data Access Application Block
Jul 11, 2007 at 7:03 PM
A common task for me is to return a string array from a DbDataReader for filling a drop-down list or some other purpose where all I want is the single string array rather than a table or dataset.

I typically write a data helper class with a function that returns a string array when passed a command object with the query and parameters already constructed and an ordinal number, or I write a method to return the string array when passed an already-filled DataReader and an ordinal number.

Ideally, I would extend the command object to include a behavior to return the string array and let the command object do the work. I think it would be a great enhancement to the Enterprise Library DAAB to add this behavior. It would save having to re-write the code over and over again.