Tutorial 14 (Configuring a Business Object relationship)


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I just finished tutorial 14, Configuring a Business Object relationship, and when i got to the end it said "Designing a child form that will show use of a business object relationship is beyond the scope of this tutorial". Well I've looked through the help file and the forums and can't find a parent-child tutorial.



So my question is how do i create a form with two grids on it to demonstrate how this business object relationship works.
Replies
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Thanks, works now. A couple related questions. When I move to a record in the parent grid that doesnt have related child records it doesnt clear the grid, it just leaves the records from the previous record.



Plus when I tried to add a child record I got an error. I have attached a screen shot of that error. Keep in mind that I am using the pubs database and my parent is Publishers and my child is Titles. I think it has something to do with the primary key in Titles being Alphanumeric. Not sure how to resolve the problem though.



Thanks
Attachments
New Child Record Error.jpg (144 views, 85.00 KB)
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The error you're getting when trying to insert the child record is because the Titles business object is configured with PrimaryKeyIsAutoIncremented = True, and the primary key can only be auto-incremented for numeric data types. Since the primary key is not an auto-incremented value, you'll need to set the PrimaryKeyIsAutoIncremented property to False and assign a valid PK value for the new child record before saving. Basically, the server cannot assign the PK value, you'll have to assign it on the client side.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
As for the child grid not being cleared when you select a record that has no child records, put a handler on the TitlesBO.FilterChanged event and within it, put a message box, or a Debug.WriteLine() call within it and print the TitlesBO.Filter value. Basically, I want to make sure the filter is being set whenever you select a record that doesn't have any child records.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
Trent L. Taylor - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago
StarkMike - 19 Years Ago
StrataFrame Team - 19 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search