VMI,
You can't perform selects in that manner from a DataTable. The best you
can do is call the Select method, and pass a filter based on column values
(the documentation for the Select method will tell you how you can construct
a filter). Once you do that, you can take the rows returned, and copy only
the columns you want from each row to a new data table.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"VMI" <vo******@yahoo.com> wrote in message
news:Om****************@tk2msftngp13.phx.gbl...
How can I run a Select query from a datatable so that it only brings the
fields I want? For example, if my datatable has 30 fields, a query would
be "select custId, Name" because those are the only two fields I need.
Then I'd like to put the result in another datatable.
Thanks.