|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Copy a DataTableHi,
I'm running code that creates a new datatable based on filtered datatable. My code uses the Select method to filter the data and loops throw each row to copy its contents to the new datatable. My question is, is there a better/faster method of performing this task, rather than looping through the datatable? Thanks in advance, Roger Roger,
In version 2005 you can use the DataView.ToTable I hope this helps, Cor <roger.canti***@gmail.com> schreef in bericht Show quote news:1145891955.099970.81110@y43g2000cwc.googlegroups.com... > Hi, > > I'm running code that creates a new datatable based on filtered > datatable. My code uses the Select method to filter the data and loops > throw each row to copy its contents to the new datatable. My question > is, is there a better/faster method of performing this task, rather > than looping through the datatable? > > Thanks in advance, > > Roger > Roger,
Than I do not know a better method. They did not add it to Version 2005 for nothing of course. Cor <roger.canti***@gmail.com> schreef in bericht Show quote news:1145895411.739669.327310@g10g2000cwb.googlegroups.com... > We're still on 2003, though. >
http://weblogs.sqlteam.com/davidm/archive/2004/01/14/722.aspx
The Project Method, This may be a long way around but if you know you will need to exploit relational operators (or if that is your preferred way to solve problems) in the future, it's worth building the SQLOPS class up from the blog. Show quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:u67O9i8ZGHA.4248@TK2MSFTNGP05.phx.gbl... > Roger, > > Than I do not know a better method. They did not add it to Version 2005 for nothing of course. > > Cor > > <roger.canti***@gmail.com> schreef in bericht news:1145895411.739669.327310@g10g2000cwb.googlegroups.com... >> We're still on 2003, though. >> > > |
|||||||||||||||||||||||