StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Issues to Override the Property...Expand / Collapse
Author
Message
Posted 04/13/2006 11:41:17 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 04/20/2006 3:08:53 AM
Posts: 2, Visits: 2
Hi

I'm using the Pre-Release of your Application Framework (1.4.0) and I get an error when I want to start the Visual Basic WinForms-Example or Tutorials:
"Public ReadOnly Property PrimaryKeyField() As String" wurde nicht als "Overridable" deklariert und kann daher nicht von "Public Overrides ReadOnly Property PrimaryKeyField() As String" überschrieben werden.C:\Programme\MicroFour\StrataFrame\VB.NET Tutorial\Tutorial_WinVB_14\OrdersBO.Designer.vb


I have the german version of Visual Studio... so I am sorry for non-english errormessages...

The problem is that the Property PrimaryKeyField was not declared as Overridable, so I can not override it in the subclass...

Shall I download version 1.3.0 instead or is there some quick solution?

Best regards
Sven
Post #798
Posted 04/13/2006 5:02:22 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 1:28:18 AM
Posts: 4,566, Visits: 4,549
Sven,

Yes, sorry about this.  The tutorials on the pre-release have not bee updated so you are getting the error because the PrimaryKeyField is now an array instead of a String.  THis was added to support compound primary keys.  You can resolve this error yourself if you would like by changing the line in error to something like this:

Me.PrimaryKeyField = New String() {"TheFieldname"}

ALso, we will have the official 1.4 release available next week and the tutorials will be updated as well   Let me know if this doesn't answer your question.

Post #800
Posted 04/17/2006 6:46:29 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 12/18/2007 7:02:15 PM
Posts: 8, Visits: 82
I'm having the same problem and your suggested solution gets rid of one of the errors but I am unable to run the sample. I have two different errors. I suppose I can wait until 1.4 is official but after seeing a demo over the weekend, I'm anxious to start using it. My first error repeats itself in all four business objects.

Public Overrides ReadOnly Property PrimaryKeyField() As String
    Get
       
Return "cust_pk"
    End Get
End Property

The error is on "PrimaryKeyField". VS help suggests that I use Overload or Shadow instead of Overrides.

The other error I get I believe you address in your post but I just wanted to make sure.

BusinessParentRelationship1.ForeignKeyField = "orit_or_pk"
BusinessParentRelationship1.ParentBusinessObjectType = "StrataFrameSample.OrdersBO"
BusinessParentRelationship1.ParentPrimaryKeyField = "or_pk"

The error is on "orit_or_pk" in the first line and "or_pk" in the third line. These errors occur in the Order Items business object. I have similar errors in the Orders business object.

I'm pretty new to VS so this may be an obvious fix for a veteran. I hope you dont mind helping out a "newbie" 

Post #815
Posted 04/17/2006 9:55:55 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 1:28:18 AM
Posts: 4,566, Visits: 4,549
Jerry,

Never feel bad for asking a question!  That's what a forum is about.  Besides, this is a very valid question.  The problem is that we have added some functionality in version 1.4 to support compound primary keys which in turn supports compound foreign keys.  This means that each of the errors requires that the definition is an array instead of a string.  To do this, the definition would be like this:

BusinessParentRelationship1.ForeignKeyField = New String() {"orit_or_pk"}
BusinessParentRelationship1.ParentBusinessObjectType = "StrataFrameSample.OrdersBO"
BusinessParentRelationship1.ParentPrimaryKeyField = New String() {"or_pk"}

Let me know if this doesn't clear things up.  Also, the official 1.4 release will be released this week and the tutorials will be fixed as well.  Sorry for any trouble this may have caused.

Post #816
Posted 04/18/2006 10:49:12 AM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 12/18/2007 7:02:15 PM
Posts: 8, Visits: 82
Hi Trent

That cleared up 4 of the 8 errors that I am getting. How do I apply what you told me to the first set of errors?

Public Overrides ReadOnly Property PrimaryKeyField() As String
    Get
       
Return "cust_pk"
    End Get
End Property

Post #818
Posted 04/18/2006 3:48:53 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 12/18/2007 7:02:15 PM
Posts: 8, Visits: 82
Hey Trent--

No need to reply here. I went and rebuilt the business objects in the BO Mapper and these errors corrected themselves. Thanks for your help.

Jerry

Post #819
Posted 04/20/2006 3:09:33 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 04/20/2006 3:08:53 AM
Posts: 2, Visits: 2
Thank you for your help.
Post #828
Posted 04/20/2006 8:32:31 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 1:28:18 AM
Posts: 4,566, Visits: 4,549
Glad you got it going.    Let me know if you have another other issues.
Post #837
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 6:36am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 9 queries. Compression Enabled.
Site Map - Home -