Trent L. Taylor (09/28/2007)
Yes, this message is because the partial class has not been built. When we create the partial class for the BO we automatically overwrite the TableName property, which on the BO you are referring does not have it overwritten so thus you get the error. If you HAve built your partial class then something else is going on. Can you post your partial class file here. It will be the MyBo.Designer.vb file.I think that the problem is that I like to create the copy of a (unknown yet on design) new business object (I trying to create a generic CRUD) and can´t use the businesslayer to define the type of _CopyBO" because it don't override the tablename property :S I not sure how to avoid this problem and copy a single record from the primarybusinessobject into a temporal 1-row business object copy, I don´t known how I can declare the _copyBO as same type that
myform.primarybusinessObject, sometype like:
dim _copybo as gettype(me.primarybusinessobject) '<---- something like this exist on VB?
Thanks and sorry for my bad english and all my newbie questions
--------------------------------------------
I repeat the code that I posted before
My "full" code:
--------------
Private _CopyBO As
New MicroFour.StrataFrame.Business.BusinessLayerDim sFiltroAnterior As String = Me.PrimaryBusinessObject.Filter
Dim _CurrentRowIndex As Integer = Me.PrimaryBusinessObject.CurrentRowIndex
Me.PrimaryBusinessObject.Filter = Me.PrimaryBusinessObject.PrimaryKeyField & " = " & Me.PrimaryBusinessObject(Me.PrimaryBusinessObject.PrimaryKeyField)
'-- at this line the "tablename" error ocurrs
_CopyBO.CopyDataFrom(Me.PrimaryBusinessObject, MicroFour.StrataFrame.Business.BusinessCloneDataType.ClearAndFillFromCompleteTable)
Me.PrimaryBusinessObject.Filter = sFiltroAnterior
Me.NavigateToPrimaryKey(_RegistroEnMemoriaBO(_RegistroEnMemoriaBO.PrimaryKeyField))