C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




.NET Performance Tips


Posted Date: 21 May 2008    Resource Type: Tips    Category: Web Development
Author: revathiMember Level: Silver    
Rating: Points: 1



While copying data from one DataTable to another, the simple way is to clone an existing DataTable, loop through all rows of source dataTable and copy data column by column and add row to the destination DataTable.

But this is not a feasible solution if there are millions of records.Hence, a better way is to use the DataTable ImportRow() method.

The ImportRow() method of the DataTable copies a row into a DataTable with all of the properties and data of the row.It actually calls NewRow() method on destination DataTable with current table schema and sets DataRowState to ‘Added’.




Responses

Author: Vasudevan Deepak Kumar    21 May 2008Member Level: Diamond   Points : 2
Please appropriately caption your TIP. I see you one more tip with the same caption http://www.dotnetspider.com/resources/16987-Net-performance-Tips.aspx


Author: revathi    21 May 2008Member Level: Silver   Points : 2
Thanks for your suggestion.I will take care of it.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: .Net performance Tips
Previous Resource: Some Shortcuts in Web development
Return to Discussion Resource Index
Post New Resource
Category: Web Development


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use