| | | StrataFrame 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 |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 4:50:35 PM Posts: 4,796, Visits: 4,766 |
| | 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. |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 10/22/2008 5:51:23 PM Posts: 8, Visits: 83 |
| 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 PropertyThe 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" |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 4:50:35 PM Posts: 4,796, Visits: 4,766 |
| | 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. |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 10/22/2008 5:51:23 PM Posts: 8, Visits: 83 |
| | 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 |
| | | | 
StrataFrame Beginner
       
Group: StrataFrame Users Last Login: 10/22/2008 5:51:23 PM Posts: 8, Visits: 83 |
| | 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 |
| | | | StrataFrame Beginner
       
Group: Forum Members Last Login: 04/20/2006 3:08:53 AM Posts: 2, Visits: 2 |
| Thank you for your help. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 4:50:35 PM Posts: 4,796, Visits: 4,766 |
| Glad you got it going. Let me know if you have another other issues. |
| |
|
|