StrataFrame Forum

I can't think this morning

http://forum.strataframe.net/Topic4027.aspx

By Paul Chase - 11/1/2006

Any ideas on why this Isn't working. This is in a base class so I dont have to do it in all bo's. 

Protected Overrides Sub OnSetDefaultValues()

MyBase.OnSetDefaultValues()

'Get Reference To Primary Key Field Property

Dim LoPkField As Reflection.PropertyInfo = Me.GetType.GetProperty(Me.PrimaryKeyField)

'If the PK is a Guid Generate a Sequential GUID to prevent Index fragmentation

If LoPkField.PropertyType Is GetType(System.Guid) Then

LoPkField.SetValue(Me, BoCommon.NewSeqGuid, Nothing)

End If

End Sub

By Paul Chase - 11/1/2006

Never mind it works fine I'm just a little slow I forgot to change the inherits statement.

Paul

By Trent L. Taylor - 11/1/2006

Hehe  Glad you got it working.
By Paul Chase - 11/1/2006

Me 2 BigGrin

Ben got me interested in using reflection and now I am trying to put it to good use.  

By Trent L. Taylor - 11/1/2006

Reflection is a great tool.  Smile