﻿<?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 Data retrival in 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 23:30:54 GMT</lastBuildDate><ttl>20</ttl><item><title>Problem with Data retrival in BO</title><link>http://forum.strataframe.net/FindPost8400.aspx</link><description>I walked the tutorial and made it step by step also I made my own program and made some BO-s UniversityBO, FacultyBO ... the UniversityBO at the FillTop100 method gives me an error&lt;br&gt;
My code is this:&lt;br&gt;
&lt;br&gt;
    Public Sub FillTop100()&lt;br&gt;
&lt;br&gt;
        Me.FillDataTable("SELECT TOP 100 * FROM Universitate")&lt;br&gt;
&lt;br&gt;
    End Sub&lt;br&gt;
&lt;br&gt;
The error is this One :(I mention that I followed the standard procedure in making BO and mapping data - yesterday it was working fine )&lt;br&gt;
&lt;br&gt;
MicroFour.StrataFrame.Data.DataLayerException was unhandled&lt;br&gt;
  Message="An error occurred while creating a new DataLayer for the business object."&lt;br&gt;
  Source="MicroFour StrataFrame Business"&lt;br&gt;
  StackTrace:&lt;br&gt;
       at MicroFour.StrataFrame.Business.BusinessLayer.get__DataLayer()&lt;br&gt;
       at MicroFour.StrataFrame.Business.BusinessLayer.FillDataTable(String SelectStatement)&lt;br&gt;
       at ManagerUniversitate.UniversitateBO.FillTop100() in D:\5.MyDocuments\Visual Studio 2005\Projects\ManagerUniversitate\ManagerUniversitate\Libs\UniversitateBO.vb:line 69&lt;br&gt;
       at ManagerUniversitate.frmActualizareUniversitate.UniversitateBO1_ParentFormLoading() in D:\5.MyDocuments\Visual Studio 2005\Projects\ManagerUniversitate\ManagerUniversitate\Forms\frmActualizareUniversitate.vb:line 5&lt;br&gt;
       at MicroFour.StrataFrame.Business.BusinessLayer.raise_ParentFormLoading()&lt;br&gt;
       at MicroFour.StrataFrame.Business.BusinessLayer.OnParentFormLoading()&lt;br&gt;
       at MicroFour.StrataFrame.Business.BusinessLayer.RaiseParentFormLoadingEvent()&lt;br&gt;
       at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.InitializeFormLoadObjects()&lt;br&gt;
       at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.OnLoad(EventArgs e)&lt;br&gt;
       at System.Windows.Forms.Form.OnCreateControl()&lt;br&gt;
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)&lt;br&gt;
       at System.Windows.Forms.Control.CreateControl()&lt;br&gt;
       at System.Windows.Forms.Control.WmShowWindow(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Control.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.ContainerControl.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Form.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Native&amp;#119;indow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;br&gt;
       at System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)&lt;br&gt;
       at System.Windows.Forms.Control.SetVisibleCore(Boolean value)&lt;br&gt;
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)&lt;br&gt;
       at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.SetVisibleCore(Boolean value)&lt;br&gt;
       at System.Windows.Forms.Control.Show()&lt;br&gt;
       at ManagerUniversitate.frmMain&amp;#119;indow.UniversitateToolStripMenuItem_Click(Object sender, EventArgs e) in D:\5.MyDocuments\Visual Studio 2005\Projects\ManagerUniversitate\ManagerUniversitate\Forms\frmMain&amp;#119;indow.vb:line 32&lt;br&gt;
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;br&gt;
       at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)&lt;br&gt;
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;br&gt;
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;br&gt;
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;br&gt;
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;br&gt;
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;br&gt;
       at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)&lt;br&gt;
       at System.Windows.Forms.Control.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.ToolStrip.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.MenuStrip.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Control.ControlNative&amp;#119;indow.OnMessage(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Control.ControlNative&amp;#119;indow.WndProc(Message&amp; m)&lt;br&gt;
       at System.Windows.Forms.Native&amp;#119;indow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;br&gt;
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)&lt;br&gt;
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)&lt;br&gt;
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)&lt;br&gt;
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)&lt;br&gt;
       at System.Windows.Forms.Application.Run(Form mainForm)&lt;br&gt;
       at ManagerUniversitate.frmMain&amp;#119;indow.Main() in D:\5.MyDocuments\Visual Studio 2005\Projects\ManagerUniversitate\ManagerUniversitate\Forms\frmMain&amp;#119;indow.Designer.vb:line 2&lt;br&gt;
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)&lt;br&gt;
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)&lt;br&gt;
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()&lt;br&gt;
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)&lt;br&gt;
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)&lt;br&gt;
       at System.Threading.ThreadHelper.ThreadStart()&lt;br&gt;</description><pubDate>Mon, 23 Apr 2007 09:34:07 GMT</pubDate><dc:creator>justalex</dc:creator></item><item><title>RE: Problem with Data retrival in BO</title><link>http://forum.strataframe.net/FindPost8430.aspx</link><description>Is there an InnerException to that exception that you posted?&amp;nbsp; That exception generally occurs when the DataSource could not be found in the DataSources collection.&amp;nbsp; So, if the DataSourceKey for the business object is wrong, or the SetDataSources() method within the AppMain.vb (Program.cs) is wrong, then you'll get that exception.&amp;nbsp; &lt;/P&gt;&lt;P&gt;FYI, if you get that exception, let the method continue to run and you'll get the red exception dialog that will give you the InnerException.</description><pubDate>Mon, 23 Apr 2007 09:34:07 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Problem with Data retrival in BO</title><link>http://forum.strataframe.net/FindPost8429.aspx</link><description>This problem should be a simple one to fix.&amp;nbsp; The message it is giving you indicates that you do not have the proper data access layer information setup in the AppMain.vb (or program.cs) file.&amp;nbsp; Open the AppMain.vb (or program.cs) file and go to the SetDataSources method.&amp;nbsp; If you are calling the Databasics.SetConnections() method then you will need to verify the AddRequiredDataSource statements above to verify that the correct database name has been provided.&amp;nbsp; This will not correct your problem but may give you a clue.&amp;nbsp; More than likley the ConnectionWizard has already run once and may not be coming up again, but the problem is that your connection string is invalid.&lt;P&gt;Just to test and make sure it is a connection issue, comment out the line that calls Databasics.SetConnections().&amp;nbsp; Below this line, manually add your connection string:&lt;/P&gt;&lt;P&gt;[codesnippet]Databasics.DataSources.Add(New SqlDataSourceItem("","server=localhost;integrated security=SSPI;database=MyDatabase;"))[/codesnippet]&lt;/P&gt;&lt;P&gt;If this works, then you can put it back the way it was and then force the connection wizard to come back up so you can edit the connection string:&lt;/P&gt;&lt;P&gt;[codesnippet]ConnectionManager.ShowAvailableConnectionStrings()[/codesnippet]&lt;/P&gt;&lt;P&gt;Calling this method will show all available connection strings for this application and allow you to modify the string.&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; The database and tables must obviously exist within the server in which you are attempting to connect.&amp;nbsp; I know that you know this, but we have chased that rabbit before :)</description><pubDate>Mon, 23 Apr 2007 09:32:06 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Problem with Data retrival in BO</title><link>http://forum.strataframe.net/FindPost8403.aspx</link><description>also I see That this Message is given to me by all the Bo-s when I request their Data and I think that happened after I remapped the data with the BO Mapper strange thing is that I requested a Rebuild for all the bo-s ... any Ideas ?</description><pubDate>Sun, 22 Apr 2007 09:57:42 GMT</pubDate><dc:creator>justalex</dc:creator></item><item><title>RE: Problem with Data retrival in BO</title><link>http://forum.strataframe.net/FindPost8402.aspx</link><description>as much as I would love this to be the issue it is not :( I don't know what is the problem if I make the exact same steps all over again it works but in that case it does not I even deleted the UniversitateBO and recreated it and the code and still nothing :( ...</description><pubDate>Sun, 22 Apr 2007 09:24:34 GMT</pubDate><dc:creator>justalex</dc:creator></item><item><title>RE: Problem with Data retrival in BO</title><link>http://forum.strataframe.net/FindPost8401.aspx</link><description>Hi Alex.&lt;/P&gt;&lt;P&gt;I don't expect this to be, but you called your BO UniversityBO. Is your table called University? If so, you have put Universitate in the SQL statement.</description><pubDate>Sun, 22 Apr 2007 08:17:48 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>