Click here to Skip to main content
12,759,875 members (29,722 online)
Click here to Skip to main content

Tagged as

Stats

0 views
Posted 2 Nov 2012

How to copy one datatable to another

, 3 Nov 2012 CPOL
You may use this code for your task. DataTable dtTarget = new DataTable(); dtTarget = dtSource.Clone(); DataRow[] rowsToCopy; rowsToCopy = dtSource.Select("key='" + matchString + "'"); foreach (DataRow temp in rowsToCopy) { dtTarget.ImportRow(temp); }

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 2-Nov-12 19:09 Available AshishChaudha
Updates in content.
1 No 2-Nov-12 17:08 Available subhajit Giri

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Asp.Net Developer

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170217.1 | Last Updated 3 Nov 2012
Article Copyright 2012 by subhajit Giri
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid