DataRowBuilder and custom DataRow

  • Thread starter =?ISO-8859-1?Q?Stefan_S=F6ljemo?=
  • Start date
?

=?ISO-8859-1?Q?Stefan_S=F6ljemo?=

Hi!

I need to create a custom DataRow like strongly typed dataset.
This because i need one extra property. In this post called
"ExtendedProperty".

My datatable class C_MyTable inherits the DataTable class and
implements the function NewRowFromBuilder as follow:

Protected Overrides Function NewRowFromBuilder(ByVal builder As
DataRowBuilder)As DataRow
Return New C_MyRow(builder)
End Function

My DataRow class C_MyRow inherits the DataRow class and implements the
constructor as follow:

Friend Sub New(ByVal rb As DataRowBuilder)
MyBase.New(rb)
me.ExtendedProperty = ???
Me.tableODL = CType(Me.Table, C_ODLDataTable)
End Sub

Now to the quiestion.
NewRowFromBuilder is called when using GetChanges or Merge mothods at
DataSet objects. This is good. What i kan see so make the constructor
in the DataRow class copy of all columns and table data. I would like
to even copy my ExtendedProperty from the original row to the new row.
Is it possible to access the orignal row?
All access to the dataRowBuilder is private to it seems to me that is
not posssible but how did the constructor do this?
Does i need to to this with IL Assembler?

// Stefan
 
T

Tony Glascow

It is really stupid that the DataRowBuilder not is
inheritable and got private members. A good reason to not
use ADO.NET in proffessional applications.

-- Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top