Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Beginning C# 2005 Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning C# 2005 Databases
This is the forum to discuss the Wrox book Beginning C# 2005 Databases by Karli Watson; ISBN: 9780470044063
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning C# 2005 Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 12th, 2008, 04:45 PM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default Is it possible to copy n-row to another dataset?

Is it possible to copy n-row to another dataset?

Currently I am using below code published in another forum..
dim srcRow, dstRow as DataRow, dstTab as Datatable
  srcRow=...
  dstRow=dstTab.NewRow()
  For i as integer=0 to dstrow.columns.count-1
    dstRow(i)=srcrow(i)
  Next
  dstTab.Rows.Add(dstRow)

is there any other way that will copy faster than this??

Any input or pointer will be great !!

Cheers :)

vinod
__________________
Cheers :)

vinod
  #2 (permalink)  
Old November 12th, 2008, 08:53 PM
Friend of Wrox
 
Join Date: Jun 2008
Location: Snohomish, WA, USA
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, if the two rows are *THAT* compatible, you probably don't need to copy the fields one by one.

You can probably just do
    dstTab.Rows.Add( srcrow )

Did you try that???
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy n-row to another dataset? vinod_yadav1919 C# 0 November 12th, 2008 04:48 PM
Copy DataSet prasanta2expert ASP.NET 1.0 and 1.1 Professional 1 January 22nd, 2007 09:30 AM
copy entire row stealthdevil Access VBA 3 December 1st, 2006 11:39 AM
Copy dataset to another dataset kapila VB.NET 2 November 13th, 2005 06:25 AM
copy datacolumn from one dataset to another hkpanda ADO.NET 1 July 25th, 2003 12:04 PM



All times are GMT -4. The time now is 05:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.