﻿<?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?)  » Latest release and Oracle business object mapping</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 09:38:08 GMT</lastBuildDate><ttl>20</ttl><item><title>Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost265.aspx</link><description>Create a Strataframe project and add a business object to it.&lt;/P&gt;&lt;P&gt;Map the business object to an Oracle database.&lt;/P&gt;&lt;P&gt;You get a select oracle table, but at the root node it has SQL server, and under that it has the tables of the database instance. Should the SQL server be named oracle, it is misleading.&lt;/P&gt;&lt;P&gt;You build a partial class and everything is ok.&lt;/P&gt;&lt;P&gt;You try to build and you get the following error:&lt;/P&gt;&lt;P&gt;Error&amp;nbsp;1&amp;nbsp;The name 'InitializeComponent' does not exist in the current context&amp;nbsp;C:\VSPrjs\MedSelect.Oncology.Login\MedSelect.Oncology.Login\LoginBusiness.cs&amp;nbsp;24&amp;nbsp;13&amp;nbsp;MedSelect.Oncology.Login&lt;BR&gt;&lt;/P&gt;&lt;P&gt;This is a new solution, not one based from previous version.&lt;/P&gt;&lt;P&gt;Other errors:&lt;/P&gt;&lt;P&gt;Error&amp;nbsp;4&amp;nbsp;The name 'LoginBusiness_CheckRulesOnCurrentRow' does not exist in the current context&amp;nbsp;C:\VSPrjs\MedSelect.Oncology.Login\MedSelect.Oncology.Login\LoginBusiness.Designer.cs&amp;nbsp;42&amp;nbsp;83&amp;nbsp;MedSelect.Oncology.Login&lt;BR&gt;&lt;/P&gt;&lt;P&gt;Error&amp;nbsp;7&amp;nbsp;The type or namespace name 'OracleClient' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)&amp;nbsp;C:\VSPrjs\MedSelect.Oncology.Login\MedSelect.Oncology.Login\LoginBusiness.Designer.cs&amp;nbsp;1014&amp;nbsp;72&amp;nbsp;MedSelect.Oncology.Login&lt;BR&gt;&lt;/P&gt;&lt;P&gt;I just assumed all references would be placed since you selected oracle.&lt;/P&gt;&lt;P&gt;Am I&amp;nbsp; doing something or is it an issue that needs fixed?</description><pubDate>Mon, 12 Dec 2005 21:12:20 GMT</pubDate><dc:creator>John Frankewicz</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost283.aspx</link><description>So, I guess my question is now, are you working?  &lt;br&gt;
&lt;br&gt;
First off, some clairification.  The Business Object Mapper is only used for design-time creation of the business objects.  Once the partial class is built for the business object, the Business Object Mapper ceases to do anything for you.  It does not tell the application what table to talk to at runtime; that's your job.&lt;br&gt;
&lt;br&gt;
Scott is correct... you have to have the OracleDataSourceItem in the collection at runtime.  You can do this one of two ways:  you can add your parameters to the ConnectionManager through the AddRequiredConnection() method and the ConnectionManager will show the wizard at runtime, the wizard then takes care of adding the OracleDataSourceItem to the collection.  Or, you can add the OracleDataSourceItem to the DataLayer.DataSources collection manually... &lt;br&gt;
&lt;br&gt;
The DataSources collection on the DataLayer class specifies the application wide collections at runtime.  So, the Business Object Mapper creates the structure of the business object at design-time, while the DataSources collection tells the business object what database to talk to at runtime.&lt;br&gt;
&lt;br&gt;
In the code that you pasted in, you have the ConnectionManager.AddRequesteDataSourceItem() method adding a SQL Server required data source... This tells the ConnectionManager, that when you call the SetConnections() method, it needs to configure a SQL Server connection.  What you need to do is comment out the SQL Server data source item and un-comment out the Oracle data source item.  OR, you can add the OracleDataSourceItem you need manually (which is what the commented code below the ConnectionManager.SetConnections() method is used for.&lt;br&gt;
&lt;br&gt;
To answer your last question: where is the connection information stored, it's stored in two encrypted files in the C:\Documents and Settings\All Users\Application Data\MicroFour\ConnectionData folder.  When you make the call to ConnectionManager.SetConnections(), it looks at the calls you made to AddRequiredDataSourceItem and decides "hey, the application needs an Oracle connection."  It then looks at the files in the folder mentioned above to see if the end-user has already configured this connection.  If it doesn't find the information in the files, it pops up the wizard... hence why you saw the wizard when you entered a new data source key.&lt;br&gt;
&lt;br&gt;
So, the template creates the calls you need to AddRequiredDataSourceItem.  You have to customize them for the database that you need.  Hopefully this gets your quesions answered.</description><pubDate>Mon, 12 Dec 2005 21:12:20 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost276.aspx</link><description>I needed to add a unique key and then when I ran the application I got a wizzard.&lt;/P&gt;&lt;P&gt;I don't get a runtime exception, but I don't understand the wizzard and I assume this wizzard is a one-time think, which brings about the question where are the username and password stored?</description><pubDate>Mon, 12 Dec 2005 18:34:37 GMT</pubDate><dc:creator>John Frankewicz</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost274.aspx</link><description>&lt;TABLE cellSpacing=0 cellPadding=0 width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=smalltxt vAlign=top&gt;&lt;SPAN id=_ctl1__ctl0_ctlTopic__ctl0_ctlPanelBar_ctlTopicsRepeater__ctl4_lblFullMessage&gt;&lt;FONT color=#008080 size=2&gt;&lt;P&gt;&lt;FONT color=#cc0000&gt;&lt;FONT color=#1f5080&gt;My guess would be that all you need to do is fill in the database name in the 4th parameter.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#cc0000&gt;//ConnectionManager.AddRequiredDataSourceItem("", "Oracle Connection", &lt;BR&gt;// DataSourceTypeOptions.Oracle, "", "This connection is used by WindowsApplication1.");&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#cc0000&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;Hope this helps\works.</description><pubDate>Mon, 12 Dec 2005 18:21:38 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost273.aspx</link><description>Addition information from the previous post.&lt;/P&gt;&lt;P&gt;I don't see the Oracle Connection filled out. I THOUGHT that after I did the Business Object mapping all all was done,?&lt;/P&gt;&lt;P&gt;So it looks like my exception is being caused by not having the proper hooks to oracle?&lt;/P&gt;&lt;P&gt;Need some guidance very bad :)&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//------------------------------------&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Using the Connection Manager&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//------------------------------------&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 information specific to this application and the data sources&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// The application key:&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ConnectionManager&lt;/FONT&gt;&lt;FONT size=2&gt;.ApplicationKey = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"WindowsApplication1"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ConnectionManager&lt;/FONT&gt;&lt;FONT size=2&gt;.ApplicationDefaultTitle = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"WindowsApplication1 Connection"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ConnectionManager&lt;/FONT&gt;&lt;FONT size=2&gt;.ApplicationDefaultDescription = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"This application connection is used by WindowsApplication1"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Set the required data source information so that the ConnectionManager can gather it&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// SQL Connection&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ConnectionManager&lt;/FONT&gt;&lt;FONT size=2&gt;.AddRequiredDataSourceItem(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;""&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"SQL Connection"&lt;/FONT&gt;&lt;FONT size=2&gt;,&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DataSourceTypeOptions&lt;/FONT&gt;&lt;FONT size=2&gt;.SqlServer, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"MyDatabase"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"This connection is used by WindowsApplication1."&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Oracle Connection&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//ConnectionManager.AddRequiredDataSourceItem("", "Oracle Connection", &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// DataSourceTypeOptions.Oracle, "", "This connection is used by WindowsApplication1.");&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// Access Connection&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//ConnectionManager.AddRequiredDataSourceItem("", "Access Connection", &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// DataSourceTypeOptions.MicrosoftAccess, "", "This connection is used by WindowsApplication1.");&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// FoxPro Connection&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//ConnectionManager.AddRequiredDataSourceItem("", "Visual Fox Pro Connection", &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// DataSourceTypeOptions.VisualFoxPro, "", "This connection is used by WindowsApplication1.");&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Make the call to SetConnections which will gather the connection information, show the connection wizard&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// if needed and set the DataSources collection on the DataLayer class.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ConnectionManager&lt;/FONT&gt;&lt;FONT size=2&gt;.SetConnections();&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Mon, 12 Dec 2005 18:09:42 GMT</pubDate><dc:creator>John Frankewicz</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost272.aspx</link><description>Did you make the required changes in the appmain.cs file in &lt;FONT color=#0000ff size=2&gt;&lt;/P&gt;&lt;P&gt;private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; SetDataSources()&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#008080 size=2&gt;&lt;P&gt;&lt;FONT color=#cc0000&gt;//ConnectionManager.AddRequiredDataSourceItem("", "Oracle Connection", &lt;BR&gt;// DataSourceTypeOptions.Oracle, "", "This connection is used by WindowsApplication1.");&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Mon, 12 Dec 2005 18:05:59 GMT</pubDate><dc:creator>Scott</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost271.aspx</link><description>I understand. I have Oracle Client installed. I can connect to a remote database using Oracle tools and your mapper finds the tables.&lt;/P&gt;&lt;P&gt;So the next mental block, I have is filling the Business object. In parent form loading I used the ParentFormLoading event to query the database using a FillDataTable.&lt;/P&gt;&lt;P&gt;I am geting an exception at runtime:&lt;/P&gt;&lt;P&gt;{"Cannot open database \"MyDatabase\" requested by the login. The login failed.\rLogin failed for user 'YOUR-72486D6880\\hp1'."}&lt;/P&gt;&lt;P&gt;I assumed that since the business object was mapped to the table in the database that all I had to do was a query.&lt;/P&gt;&lt;P&gt;I am missing something, but not sure what?</description><pubDate>Mon, 12 Dec 2005 17:53:04 GMT</pubDate><dc:creator>John Frankewicz</dc:creator></item><item><title>RE: Latest release and Oracle business object mapping</title><link>http://forum.strataframe.net/FindPost267.aspx</link><description>Hehe, yes the SQL Server node is completely misleading... I'll change that.&lt;br&gt;
&lt;br&gt;
As for the missing delimiters, you're namespaces do not match on your designer file and you're main code file, so the two files cannot see each other.  Make sure that the configuration in the Business Object Mapper has the correct namespace for the business object and re-build the partial class.&lt;br&gt;
&lt;br&gt;
Here's another topic where other users were getting the same problem:&lt;br&gt;
[url]http://forum.strataframe.net/Topic52-6-1.aspx[/url]&lt;br&gt;
&lt;br&gt;
As for the root of this problem, we're working on removing the namespace completely from the Business Object Mapper so you won't have to specify it, and the BOM will just use the same namespace as the main code file.&lt;br&gt;
&lt;br&gt;
As for the System.Data.OracleClient issue, no, we do not change the references for the project.  The StrataFrame Windows Application template defaults to SQL Server, so the reference to System.Data.OracleClient needs to be added (I believe that it requires Oracle's Client software version 9.something to be installed on the computer before you can run, but I'm not positive on that.)</description><pubDate>Mon, 12 Dec 2005 17:13:50 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>