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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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/d...lrfsystemdatadatatableclassimportrowtopic.asp

For complete tables just datatable.copy

I hope this helps,

Cor
 
Back
Top