﻿<?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?)  » Multipul forms and BO's with a ShardDataTableKey</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 16:02:48 GMT</lastBuildDate><ttl>20</ttl><item><title>Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3661.aspx</link><description>I have run into a problem using the ShardDataTableKey property on BO's.&amp;nbsp; I created a SFUser control with a ContactBO on the control, tied to the various controls.&amp;nbsp; The ContactBO on the usercontrol has its ShardDataTableKey set to 'ContactInfo'.&amp;nbsp; I then create a new SFStandardForm,&amp;nbsp; drop a ContactBO on the form, set its ShardDataTableKey to 'ContactInfo', drop the user control with the contact informaiton on it.&amp;nbsp; Run the form.... works great, the BO on the form and the BO on the usercontrol are one and the same and all the logic built into the user control works.&lt;/P&gt;&lt;P&gt;Open one form, select contact1, open form two, select a different contact... the contact data in now the same in both forms.&amp;nbsp; I can see that this is exactly what the ShardDataTableKey should do....&amp;nbsp; how should I handle this type of situation?</description><pubDate>Fri, 20 Oct 2006 14:15:13 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3722.aspx</link><description>No problem...I am just glad that I saw the post!</description><pubDate>Fri, 20 Oct 2006 14:15:13 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3702.aspx</link><description>Not a problem,&amp;nbsp; Thanks for the clairfication.&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Thu, 19 Oct 2006 20:16:57 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3699.aspx</link><description>[quote]&lt;SPAN id=_ctl1__ctl0_ctlTopic__ctl0_ctlPanelBar_ctlTopicsRepeater__ctl2_lblFullMessage&gt;Just for clairification,&amp;nbsp; the BOTranslation collection should no longer be used,&amp;nbsp; right?&lt;/SPAN&gt;[/quote]&lt;P&gt;There is nothing wrong with using the BO Translation collection whatsoever.&amp;nbsp; However, there may be times that it may work better for you to use the shared data table property.&amp;nbsp; But the BOTranslations collection can still be used and is in fact something I use often.&lt;/P&gt;&lt;P&gt;[quote]The only thing that is shared is the DataTable, NOT the bussiness object and it properties like the BOTranslation did?[/quote]&lt;/P&gt;&lt;P&gt;Correct.&amp;nbsp; When you use a shared data table the business objects are two different instances unlike the BO Translations.&amp;nbsp; When you use the BOTranslations the actual business object referenced in both locations becomes the same instance.&lt;/P&gt;&lt;P&gt;[quote]BO Properties (includeinformadd, includeinformedit... etc) need to be set on both business objects to function correctly?[/quote]&lt;/P&gt;&lt;P&gt;For most cases you are correct...but just keep in mind that there may be a need to set the properties on both since the shared data table shares ONLY the data table used within the BO and not the properties since they are two separate instances.&lt;/P&gt;&lt;P&gt;BTW...I am sorry it took so long to respond.&amp;nbsp; I just noticed that this item was overlooked somehow :blush:</description><pubDate>Thu, 19 Oct 2006 19:52:56 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3689.aspx</link><description>Just for clairification,&amp;nbsp; the BOTranslation collection should no longer be used,&amp;nbsp; right?&lt;/P&gt;&lt;P&gt;The only thing that is shared is the DataTable, NOT the bussiness object and it properties like the BOTranslation did?&lt;/P&gt;&lt;P&gt;BO Properties (includeinformadd, includeinformedit... etc) need to be set on both business objects to function correctly?&lt;/P&gt;&lt;P&gt;Thanks&lt;BR&gt;Scott</description><pubDate>Wed, 18 Oct 2006 20:32:53 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3669.aspx</link><description>No problem.&amp;nbsp; When you change the SharedDataTable key at runtime, the changes within the BO's data will be immediately reflected.</description><pubDate>Wed, 18 Oct 2006 10:54:18 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3667.aspx</link><description>Thanks for the info,&amp;nbsp; will look into doing that.&amp;nbsp; I knew there had to be a way.&lt;/P&gt;&lt;P&gt;Scott</description><pubDate>Wed, 18 Oct 2006 10:46:40 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: Multipul forms and BO's with a ShardDataTableKey</title><link>http://forum.strataframe.net/FindPost3664.aspx</link><description>You will need to create some sort of "unique" shared data table key.&amp;nbsp; For instance, when we use the SharedDataTable key internally (such as within a BusinessBindingSource), we use Guid.NewGuid() to create a string that pretty much guaranteed to be unique.&amp;nbsp; So, you'll probably want to add a method that gets called after the InitializeComponent within your constructor that will "modify" the SharedDataTable keys for the business objects on the control and form.</description><pubDate>Wed, 18 Oct 2006 08:21:40 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>