﻿<?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?)  » Problem with UserControl and BO</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Fri, 18 Sep 2026 04:18:00 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem with UserControl and BO</title><link>http://forum.strataframe.net/FindPost22253.aspx</link><description>Hello,&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I had a problem with a UserControl based on SFUserControl.&lt;br&gt;
&lt;br&gt;
I use 3 Database. In the BO i set Datasourcekey always to the Databasename.&lt;br&gt;
&lt;br&gt;
In my UserControl i dropped some BO to UserControl. All fine.&lt;br&gt;
&lt;br&gt;
In Control no problems. I compile Control and Drop it on form.&lt;br&gt;
&lt;br&gt;
Setup some Properties in Usercontrol on form  and run form.&lt;br&gt;
&lt;br&gt;
Form runs with no errors and COntrol works like it should.&lt;br&gt;
&lt;br&gt;
Now i close Form.&lt;br&gt;
&lt;br&gt;
When i next time load form in Designer i got errormessage.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[i]The DataSourceKey [ERPSYSTEM] is not defined. &lt;br&gt;
&lt;br&gt;
Warning An error occurred while creating a new DataLayer for the business object.D:\Projekte.Net\StrataTestForm\StrataTestForm\Form2.Designer.vb &lt;br&gt;
&lt;br&gt;
this is Code from Designerfile :&lt;br&gt;
&lt;br&gt;
Me.Controls.Add(Me.MksBaseGrid1)&lt;br&gt;
&lt;br&gt;
[/i]&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
MksBaseGrid1 is my Control. In this Control i had 1 BO where Datasourcekey ="ERPSYSTEM"&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
If i ignore the Error then Form will run with no errors but i am&lt;br&gt;
not able to modify anything in designer for this form.&lt;br&gt;
&lt;br&gt;
So what i wrong ??? I have really no idea&lt;br&gt;
&lt;br&gt;
thanks for your help&lt;br&gt;
&lt;br&gt;
Rainer</description><pubDate>Mon, 09 Mar 2009 07:48:54 GMT</pubDate><dc:creator>Rainer Kempf, RK</dc:creator></item><item><title>RE: Problem with UserControl and BO</title><link>http://forum.strataframe.net/FindPost22264.aspx</link><description>Glad you found the problem :)</description><pubDate>Mon, 09 Mar 2009 07:48:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Problem with UserControl and BO</title><link>http://forum.strataframe.net/FindPost22260.aspx</link><description>Hello Trent,&lt;br&gt;
&lt;br&gt;
Found Problem &lt;br&gt;
&lt;br&gt;
Problem was wrong Initialization-Order&lt;br&gt;
&lt;br&gt;
I called a method in Load Container Event and Object was not completly instanciated &lt;br&gt;
&lt;br&gt;
I moved my call to Container.New method and it works as expected.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks for your help&lt;br&gt;
&lt;br&gt;
Rainer</description><pubDate>Mon, 09 Mar 2009 04:20:07 GMT</pubDate><dc:creator>Rainer Kempf, RK</dc:creator></item><item><title>RE: Problem with UserControl and BO</title><link>http://forum.strataframe.net/FindPost22254.aspx</link><description>This sound smore like an issue within the definition of your data sources.&amp;nbsp; But without a sample, it is going to be very difficult for me to determine what you are fighting.&amp;nbsp; If you could please post a simple sample reproducing your issue that would be helpful.</description><pubDate>Sat, 07 Mar 2009 13:23:10 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>