Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Copy DataTable Rows Fast?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lucius - 05 Jul 2007 19:16 GMT
.NET Framework 2.0

I have a custom class inherits from DataTable. It has a method to "get
remote stuff" where it makes a web service call to a .NET 2.0 web
service that executes a TableAdapter. Now I need to just get the data
columns and rows from the TableAdapter into my lightweight class. I
think I want to do something like

 RemoteTA.Call( param1 ).Rows.CopyTo

My DataTable does not have any columns or rows to start.

Thanks.
Steven Cheng[MSFT] - 06 Jul 2007 07:40 GMT
Hi Lucius,

Regarding on this issue, are you wantting to find a way to effeciently
import the Rows(get from remote webservice) into the custom DataTable?

Based on my understanding, the .NET 2.0 DataTable class provide several
means for us to copy or import rows into it:

** Use ImportRow to import rows from another table

** You can use DataTable.Load method to load data from a IDataReader
object, which can be created through DataTable.CreateDataReader

Also when load data into datatable, you should call BeginLoadData,
EndLoadData so as to turn off event notification(improve performance).

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 10 Jul 2007 16:23 GMT
Hi Lucius,

Does my last reply helps you some? If you still have any questions, please
feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.