Filling an Array from a DataSet

Is there a quick way to fill an array from a dataset.  The only way I know how to do this is fill the dataset and the loop through filling an array.  Is there any way to do the following

arrayname=dataset("columnname")

Tim


Answer this question

Filling an Array from a DataSet

  • Kishore Babu Annavarapu

    Really don't think there's a simple way. You'll get slightly better performance, if possible, using a DataReader. That is, create a DataReader that pulls only the one column you want from the data source, and fill the array that way.

    Consider carefully why you want the data in an array. It's possible that a DataTable might perform the same duties.

  • Filling an Array from a DataSet