473,513 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cloning a dataset row OR are rows allowed to be orphans?

Please forgive me if this is not the best group for this problem. I
frequently have difficulty figuring out which group to post in. (And got
slapped down once when I postied in the wrong group:-( dotnet.general sounds
like a good place to get started.

I have the need for a data structure to have the clone / copy / independent
hunk of memory with the original values (take your choice) of a row in a
datatable. I don't see a data.datarow.clone or data.datarow.copy NOR a way of
creating the row in the absense of the table.

Can rows have existence independent of a table?
Here is what I have resorted to doing:
Public Property Shock() As Global.SimUser.dsShock.ShockRow
Get
Return Me.m_shockTable.Rows(0)
End Get
Set(ByVal value As Global.SimUser.dsShock.ShockRow)
Me.m_shockTable.Clear()
Me.m_shockTable.ImportRow(value)
End Set
End Property

what I'd like to be able to do is

Here is what I have resorted to doing:
Public Property Shock() As Global.SimUser.dsShock.ShockRow
Get
Return Me.m_shock End Get
Set(ByVal value As Global.SimUser.dsShock.ShockRow)
Me.m_shock = value.clone
End Set
End Property

Regards,
Al Christoph
Senior Consultant and Proprietor
Three Bears Software, LLC
just right software @ just right prices @3bears.biz
Nov 4 '05 #1
1 2435
Al,
Please forgive me if this is not the best group for this problem. I
frequently have difficulty figuring out which group to post in. (And got
slapped down once when I postied in the wrong group:-( dotnet.general
sounds
like a good place to get started.


Right, however *better* for this kind of question *next time* is probably

microsoft.public.dotnet.framework.adonet.

For copying indepent rows is the method

Datatable.importrow

http://msdn.microsoft.com/library/de...rtrowtopic.asp

For complete tables just datatable.copy

I hope this helps,

Cor
Nov 4 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1259
by: dotNetDave | last post by:
I have some xml that I am loading into a DataSet. Later in my program I have to clone that DataSet but I keep getting an error saying that I can't have a table named the same as my DataSet?!? If...
7
2706
by: sonic | last post by:
Hello, I am cloning a table row which contains images that have behaviors attached to them as well as onclick events. The problem is that the cloned row seems to be executing the...
3
3609
by: Dmitry Karneev | last post by:
Hi! I have a rather interesting problem. I have a dataset that contatin data from database. I need to clone this dataset with data but all id's in tables must be NULL and all DataRowStates must...
3
1521
by: MajorTom | last post by:
Hello everybody, I need help on how to use the same datase in two different form, this is the scenario: at the first form I load a big dataset (ds1) for short, but I not want to load it again...
1
2274
by: imakowski | last post by:
Is there posibility to create clone of an object without using serialization, create instance and copy, reflection ? I have a problem with DataColumnColection which is member of DataTable...
1
333
by: Al Christoph | last post by:
Please forgive me if this is not the best group for this problem. I frequently have difficulty figuring out which group to post in. (And got slapped down once when I postied in the wrong group:-(...
3
1365
by: P K | last post by:
Hi, I have 3 datasets d1Main is the main dataset having rows. I loop through rows in d1main and any row failing validations is moved to d2Bad dataset. I had to clone d2bad as d1main and then...
0
1262
by: Liming | last post by:
Hi, I designed a few DataSet Tables in the typed dataset dsigner. Recently, I encountered an error saying Failed to enable constraints. One or more rows contain values violating non-null,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.