.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> ADO.NET >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

How to copy System.data.DataRow into System.Data.DataTable in .net

Posted By:Rajshree       Posted Date: September 22, 2010    Points: 5    Category: ADO.NET    URL: http://www.dotnetspark.com  

With the help of Import Row Function in .net
 

To Convert  System.data.DataRow into System.Data.DataTable in .net We use ImportRow method

  Summary:
        //     Copies a System.Data.DataRow into a System.Data.DataTable, preserving any
        //     property settings, as well as original and current values.
        //
        // Parameters:
        //   row:
        //     The System.Data.DataRow to be imported.


Example:

DataRow[] dr=Dt.select("name='Rajshree'");
Datatable tb1=new Datatable();
tb1.ImportRow(dr[0]);




     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend