Get a DataRow from a DataView--Import from one DataSet to another
Posted on 2007-03-22
In VB .NET 2003, I want to import several records from one DataSet to another. I can easily isolate the records I want using a .RowFilter on a DataView, but I can't figure out how to import the results to the second DataSet, because .ImportRow wants a DataRow as input, and a DataView structures its results as DataRowView. Trying to do a CType(drview, DataRow) gives an error. I'm sure there must be something simple I'm missing, but I have no idea what the process would be.
(If there's a better way to select the proper records from the first dataset, I'm up for that, though I wouldn't mind understanding DataView usage a bit better in any case.)