Link to home
Start Free TrialLog in
Avatar of Ammar Iqbal
Ammar IqbalFlag for Norway

asked on

How to copy from one datable to another in Vb.net

I need to copy one datatable (dt) to another datatble (dt2), dataset or Data view in VB.NET.
  and I want to skip first  first row  in dt, and copy rest of the rows in dt2.
ASKER CERTIFIED SOLUTION
Avatar of disrupt
disrupt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ammar Iqbal

ASKER

This thing I know, but i do not want to copy all data. I need to skip first row  , and copy rest of the rows
in the copy you can delete the first row as so:

http://msdn.microsoft.com/en-us/library/feh3ed13(v=VS.100).aspx
You can either delete the first row using example above  or use LINQ to manipulate the data in the datatable as so:

http://dotnetarchitect.wordpress.com/2009/03/18/using-linq-to-manipulate-data-in-datasetdatatable/
i am using .NET framework 2.0, and linq is not included in it
you should be able to still remove the first row...using the other example...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial