﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Manually setting relations</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 17 Sep 2026 15:33:32 GMT</lastBuildDate><ttl>20</ttl><item><title>Manually setting relations</title><link>http://forum.strataframe.net/FindPost7483.aspx</link><description>I am trying to manually set a relation in the Form's load event as follows but it doesnt seem to work. Any ideas on what I am missing or is this the wrong approach? &lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoAddress1.ParentBusinessObject = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoEmployee1&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loRelation &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.Business.BusinessParentRelationship&lt;/P&gt;&lt;P&gt;loRelation.ForeignKeyField() = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;() {&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"Adr_FK_ID"&lt;/FONT&gt;&lt;FONT size=2&gt;}&lt;/P&gt;&lt;P&gt;loRelation.ParentPrimaryKeyField() = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;() {&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"EMP_PK"&lt;/FONT&gt;&lt;FONT size=2&gt;}&lt;/P&gt;&lt;P&gt;loRelation.ParentBusinessObjectType = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"PayrollBO.BOEmployee"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'Set the Relationship&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.BoContacts1.ParentRelationship = loRelation&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Thu, 15 Mar 2007 09:17:09 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Manually setting relations</title><link>http://forum.strataframe.net/FindPost7497.aspx</link><description>:)&amp;nbsp;Glad you found your trouble spot and got it working.&amp;nbsp; I understand, I have been there before!</description><pubDate>Thu, 15 Mar 2007 09:17:09 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Manually setting relations</title><link>http://forum.strataframe.net/FindPost7496.aspx</link><description>I was wrong I forgot to remove the test relation that I set up in the BO to get the code from the designer. Guess I was just over anxious to get this working</description><pubDate>Thu, 15 Mar 2007 08:36:56 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Manually setting relations</title><link>http://forum.strataframe.net/FindPost7495.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;I guess it is case sensitive??? Seems like that was the issue.</description><pubDate>Thu, 15 Mar 2007 08:17:53 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Manually setting relations</title><link>http://forum.strataframe.net/FindPost7488.aspx</link><description>That is all fine..... I need to spend some more time with it to give you a better idea if the issue but basically what I have is an address table and and address BO. I have created a configurable&amp;nbsp;user control&amp;nbsp;so&amp;nbsp;I can use the same address control thoughout the app to store addresses. I have set the bo translations etc and everything works nice except the relations part. I'll look at it some more and try to give you a better idea of what exactly is going on</description><pubDate>Wed, 14 Mar 2007 16:10:37 GMT</pubDate><dc:creator>Paul Chase</dc:creator></item><item><title>RE: Manually setting relations</title><link>http://forum.strataframe.net/FindPost7485.aspx</link><description>More than likely your full name is wrong or cannot be resolved.&amp;nbsp; The best way to get the exact settings rather than guessing is to use the type editor (builder)&amp;nbsp;to create the relationship for you.&amp;nbsp; Then go the InitializeComponent method of that BO (it will be in the partial class) and copy out the foreign field, primary field, and BO type and then place it into your code.&amp;nbsp; You can then go back and reset teh parent relationship so that you can just do it in code.&amp;nbsp; Compare what you have to what is generated through the type editor to find your problem.</description><pubDate>Wed, 14 Mar 2007 15:38:23 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>