PC Review


Reply
Thread Tools Rate Thread

About datatables

 
 
Ravindra
Guest
Posts: n/a
 
      30th Dec 2005
Hi

How to pass the content of one data table to another data table.I simply
tried using assignment operator...Example: datatable1=datatable2...But,its
not working..

ravindra






 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      30th Dec 2005
Use DataTable.Merge method

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Ravindra" <(E-Mail Removed)> wrote in message
news:Os6aH$(E-Mail Removed)...
> Hi
>
> How to pass the content of one data table to another data table.I simply
> tried using assignment operator...Example: datatable1=datatable2...But,its
> not working..
>
> ravindra
>
>
>
>
>
>



 
Reply With Quote
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      30th Dec 2005
Ravindra,

>
> How to pass the content of one data table to another data table.I simply
> tried using assignment operator...Example: datatable1=datatable2...But,its
> not working..
>

It depends what you want, if you want a copy of datatable2 in datatable1 one
than you can use the DataTable.copy command. What you are doing now is
setting the reference of datatable2 to datatable1 as well.

If you want the content to be copied than

datatable1 = datatable2.copy

I hope this helps,

Cor


 
Reply With Quote
 
Ravindra
Guest
Posts: n/a
 
      30th Dec 2005
yeah we used merge method, but the error "merge is not a method of
system.data.datatable" occured.
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%(E-Mail Removed)...
> Use DataTable.Merge method
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
> "Ravindra" <(E-Mail Removed)> wrote in message
> news:Os6aH$(E-Mail Removed)...
>> Hi
>>
>> How to pass the content of one data table to another data table.I simply
>> tried using assignment operator...Example:
>> datatable1=datatable2...But,its not working..
>>
>> ravindra
>>
>>
>>
>>
>>
>>

>
>



 
Reply With Quote
 
Skanda Subramanian
Guest
Posts: n/a
 
      30th Dec 2005
I think the DataTable.Merge works on the 2.0 Framework?

I think in your case, you can enumerate the rows and use the
LoadDataRow method of the Datatable.

 
Reply With Quote
 
Skanda Subramanian
Guest
Posts: n/a
 
      30th Dec 2005
I think the DataTable.Merge works on the 2.0 Framework?

I think in your case, you can enumerate the rows and use the
LoadDataRow method of the Datatable.

 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      30th Dec 2005

"Skanda Subramanian" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I think the DataTable.Merge works on the 2.0 Framework?


Right, is anybody still using .net 1.x? ;-)
>
> I think in your case, you can enumerate the rows and use the
> LoadDataRow method of the Datatable.


Or put datatables into a dataset, make sure that both have same name and do
a DataSet.Merge

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataTables bernardpace@yahoo.com Microsoft C# .NET 1 19th Aug 2005 12:29 PM
Two datatables =?Utf-8?B?TVRtYWNl?= Microsoft VB .NET 3 28th Jul 2005 06:10 PM
DataTables =?Utf-8?B?TUVSNzg=?= Microsoft ADO .NET 2 20th Dec 2004 09:11 PM
Datatables and XML codymanix Microsoft Dot NET 0 1st Nov 2003 09:01 PM
Datatables Debra Coleman Microsoft Excel Worksheet Functions 1 19th Sep 2003 03:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:21 PM.