﻿<?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?)  » Login Error</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 05:39:54 GMT</lastBuildDate><ttl>20</ttl><item><title>Login Error</title><link>http://forum.strataframe.net/FindPost5629.aspx</link><description>I have a Maintenace form setup, select add and populate my fields.&lt;/P&gt;&lt;P&gt;The fields populate ok &lt;/P&gt;&lt;P&gt;I then select Save data, but a Strataframe error message apperas, ....&lt;/P&gt;&lt;P&gt;Cannot Open database "MyDataBase" requested by the login.&lt;/P&gt;&lt;P&gt;I have not specisied a Login screen anywhere and cant remeber setting up a database called MyDatabase ...</description><pubDate>Tue, 09 Jan 2007 11:24:19 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5697.aspx</link><description>Can you put a break point immediately after the ConnectionManager.SetConnections() call within the SetDataSources() method?&amp;nbsp; In your watch window there, you will want to check the value of this:&lt;/P&gt;&lt;P&gt;MicroFour.StrataFrame.Data.DataBasics.DataSources[""]&lt;/P&gt;&lt;P&gt;It should be an object of type VfpDataSourceItem, not SqlDataSourceItem.</description><pubDate>Tue, 09 Jan 2007 11:24:19 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5695.aspx</link><description>Hi Ben, code taken from program.cs:&lt;/P&gt;&lt;FONT size=2&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;"Visual Fox Pro Connection"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;DataSourceTypeOptions&lt;/FONT&gt;&lt;FONT size=2&gt;.VisualFoxPro, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;@"C:\KERDEMO\DFS.dbc"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"This connection is used by YourApp."&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;</description><pubDate>Tue, 09 Jan 2007 09:04:04 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5694.aspx</link><description>For some reason, it's adding an SqlDataSourceItem and not a VfpDataSourceItem.&amp;nbsp; In the call to AddRequiredDataSourceItem, is the DataSourceTypeOptions set to VisualFoxPro or SqlServer?&amp;nbsp; If you need, you can paste the code from the SetDataSources() method out here again.</description><pubDate>Tue, 09 Jan 2007 08:43:11 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5692.aspx</link><description>Hi Ben. I did as you suggested and it is now nop longer looking for Mydatabase!&lt;/P&gt;&lt;P&gt;However, I am now getting an error trying to open the actual database. This happens on the save of a maintenance Form. I can access this database fine from VFP. I am still puzzled by the 'Login' reference as I dont have a login screen set up anywhere !!&lt;/P&gt;&lt;P&gt;BusinessLayerException&lt;BR&gt;&amp;nbsp;An error occurred while saving an the data to the server.&lt;BR&gt;DataLayerSavingException&lt;BR&gt;&amp;nbsp;Cannot open database "C:\KERDEMO\DFS.dbc" requested by the login. The login failed.&lt;BR&gt;Login failed for user 'GERARDXP\Ger O Carroll'.&lt;BR&gt;SqlException&lt;BR&gt;&amp;nbsp;Cannot open database "C:\KERDEMO\DFS.dbc" requested by the login. The login failed.&lt;BR&gt;Login failed for user 'GERARDXP\Ger O Carroll'.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Business&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnection.Open()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.SqlDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;</description><pubDate>Tue, 09 Jan 2007 01:58:35 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5666.aspx</link><description>Most likely, you ran the application once before you commented out the AddRequiredDataSourceItem for SQL that requested MyDatabase.&amp;nbsp; So, your application still thinks it needs MyDatabase.&amp;nbsp; Right after the SetConnections() method is called within the SetDataSources() method, you can add a call to ConnectionManager.ShowAvailableConnections().&amp;nbsp; This will popup the connection string builder and allow you to delete the configured connection.&amp;nbsp; Then re-run it without call to ShowAvailableConnections() and you can re-configure the connection string properly with for the FoxPro connection.</description><pubDate>Mon, 08 Jan 2007 08:52:25 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5664.aspx</link><description>This is just a standard SQL connection error.&amp;nbsp; The user who you are attempting to use cannot login or access the SQL Server connection for some reason.&amp;nbsp; If you'll notice, it is trying to connect to SQL Server and I do not see that you have specified a SQL connection.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Are you reusing this application key: &lt;FONT color=#800000&gt;StratFarmeSmaApp?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If so, then this could be your problem.&amp;nbsp; Change this key by adding a "1" to the end or something and it should force the connection wizard to come back up.&amp;nbsp; Make sure that you are pointing to the VFP database and see if the error persists.&amp;nbsp; &lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#008080&gt;ConnectionManager&lt;/FONT&gt;&lt;FONT size=2&gt;.ApplicationKey = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"StratFarmeSmaApp1"&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;If this doesn't work, remove the ConnectionManager.SetConnections() in the SetDataSOurces and hard code your connection and see if the error persists.&lt;/P&gt;&lt;P&gt;[codesnippet]MicroFour.StrataFrame.Data.DataBasics.DataSOurces.Add(New VFPDataSourceItem("","provider=VFPOLEDB;data source=C:\\MyDatabase.dbc"));[/codesnippet]&lt;/P&gt;&lt;P&gt;In fact, the first thing you may want to do is turn on database debugging so you can see exactly what is happening.&amp;nbsp; After the ConnectionManager.SetConnections() method, add this code:&lt;/P&gt;&lt;P&gt;[codesnippet]MicroFour.StrataFrame.Data.DataBasics.DataSources[0].SetDebugOn(@"c:\Output.html",true);[/codesnippet]&lt;/P&gt;&lt;P&gt;Run the application again and it will log every piece of the data interaction.&amp;nbsp; One the error occurs, bring up the HTML file and you will be able to see the connection and exactly what happened.</description><pubDate>Mon, 08 Jan 2007 08:38:55 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5661.aspx</link><description>I did not do antything to set security on (would it be on by default ?)&lt;/P&gt;&lt;P&gt;Trace as follows:&lt;/P&gt;&lt;P&gt;BusinessLayerException&lt;BR&gt;&amp;nbsp;An error occurred while saving an the data to the server.&lt;BR&gt;DataLayerSavingException&lt;BR&gt;&amp;nbsp;Cannot open database "MyDatabase" requested by the login. The login failed.&lt;BR&gt;Login failed for user 'GERARDXP\Ger O Carroll'.&lt;BR&gt;SqlException&lt;BR&gt;&amp;nbsp;Cannot open database "MyDatabase" requested by the login. The login failed.&lt;BR&gt;Login failed for user 'GERARDXP\Ger O Carroll'.&lt;/P&gt;&lt;P&gt;Source&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : MicroFour StrataFrame Business&lt;/P&gt;&lt;P&gt;Stack Trace: &lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Data.SqlClient.SqlConnection.Open()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.SqlDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()&lt;BR&gt;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ScrollableControl.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.ToolStrip.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)&lt;BR&gt;&amp;nbsp;&amp;nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)&lt;BR&gt;</description><pubDate>Mon, 08 Jan 2007 01:53:45 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5654.aspx</link><description>Are you trying to implement Security?&amp;nbsp; You will have to give me more information to go off of as I have never even heard of this message outside of this context.&amp;nbsp; Can you give me the stack trace and the inner exceptions?&amp;nbsp; Thanks.</description><pubDate>Sun, 07 Jan 2007 15:49:52 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5653.aspx</link><description>The only rferance to MyDatabase in the main program is commented out:&lt;/P&gt;&lt;P&gt;Below is acopy of Proram.cs&lt;/P&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; MicroFour.StrataFrame.Application;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; MicroFour.StrataFrame.Data;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System.Collections.Generic;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;using&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; System.Windows.Forms;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;namespace&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; StratFarmeSmaApp&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;class&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Program&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; The main entry point for the application.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;[&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;STAThread&lt;/FONT&gt;&lt;FONT size=2&gt;]&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; Main()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Enable visual styles on the application&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Application&lt;/FONT&gt;&lt;FONT size=2&gt;.EnableVisualStyles();&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Add event handlers for the application events&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.ShowGateway +=&lt;/P&gt;&lt;P&gt;&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=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ShowGatewayEventHandler&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/P&gt;&lt;P&gt;ShowGateway);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.InitializingApplication +=&lt;/P&gt;&lt;P&gt;&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=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;InitializingApplicationEventHandler&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/P&gt;&lt;P&gt;InitApplication);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.SetDataSources +=&lt;/P&gt;&lt;P&gt;&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=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;SetDataSourcesEventHandler&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/P&gt;&lt;P&gt;SetDataSources);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.UnhandledExceptionFound +=&lt;/P&gt;&lt;P&gt;&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=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;UnhandledExceptionFoundEventHandler&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/P&gt;&lt;P&gt;UnhandledExceptionFound);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.ShowLoginAndInitializeForm +=&lt;/P&gt;&lt;P&gt;&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=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ShowLoginAndInitializeFormEventHandler&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/P&gt;&lt;P&gt;ShowLoginAndInitMainForm);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Run the application&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.RunApplication();&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Gets the connection string if the application will use a custom method to aquire the connection&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; string rather than the StrataFrame Connection String Manager (optional)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; SetDataSources()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// ToDo: 1) Set the connection information below including the connection application settings and the&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// required settings information and then call the ConnectionManager's SetConnections() method.&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;// OR&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;// 2) Manually set the DataSourceItems on the DataSources collection below.&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;"Visual Fox Pro 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;.VisualFoxPro, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;@"C:\KERDEMO\DFS.dbc"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"This connection is used by YourApp."&lt;/FONT&gt;&lt;FONT size=2&gt;);&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// -- You can set as many data sources as necessary. The business objects use the data source specified&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// by their DataSourceKey property (defaults to "").&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;// 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;"StratFarmeSmaApp"&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;"StratFarmeSmaApp 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 StratFarmeSmaApp"&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=#008000 size=2&gt;// ConnectionManager.AddRequiredDataSourceItem("", "SQL 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.SqlServer, "MyDatabase", "This connection is used by StratFarmeSmaApp.");&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&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 StratFarmeSmaApp.");&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 StratFarmeSmaApp.");&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 StratFarmeSmaApp.");&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;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;// Setting the data sources manually&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;//-- SQL Server&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//DataLayer.DataSources.Add(new SqlDataSourceItem("", "myconnectionstring"));&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Oracle&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//DataLayer.DataSources.Add(new OracleDataSourceItem("", "myconnectionstring"));&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Microsoft Access&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//DataLayer.DataSources.Add(new AccessDataSourceItem("", "myconnectionstring"));&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Visual Fox Pro&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//DataLayer.DataSources.Add(new VfpDataSourceItem("", "myconnectionstring"));&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Shows the "Gateway" form (a custom form that gives the user a choice to launch different components&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; within the application) (optional)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; ShowGateway(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ShowGatewayEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Inform the application to not show the "Gateway" form again after the main form has closed&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;e.ShowGatewayAfterMainFormClose = &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Shows a login form before a main form is shown and allows security to be checked before the application&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; launches the main form (optional)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; ShowLoginAndInitMainForm(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;ShowLoginAndInitFormEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- ToDo: add any code to show a login form and authenticate the user&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// e.LoginSuccessful = ?&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Provides a centralized location to add any initialization parameters that need to be set before&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; the application is loaded and defines the form types used as main forms by the application&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; InitApplication(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;InitializingApplicationEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- Add the main form type&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 more than one form is added to the collection, they can be chosen by showing a "Gateway" form&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// and supplying the index of the form to show (At least 1 form type must be added to the collection&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;e.Forms.Add(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;typeof&lt;/FONT&gt;&lt;FONT size=2&gt;(StratFarmeSmaApp.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Form2&lt;/FONT&gt;&lt;FONT size=2&gt;));&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- ToDo: Add any extra application initialization&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;MicroFour.StrataFrame.UI.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Localization&lt;/FONT&gt;&lt;FONT size=2&gt;.MessageKeyType = MicroFour.StrataFrame.Messaging.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;MessageKeyDataType&lt;/FONT&gt;&lt;FONT size=2&gt;.XML;&lt;/P&gt;&lt;P&gt;MicroFour.StrataFrame.UI.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Localization&lt;/FONT&gt;&lt;FONT size=2&gt;.MessageLocaleID = MicroFour.StrataFrame.UI.&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Localization&lt;/FONT&gt;&lt;FONT size=2&gt;.GetActiveLanguage(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"StratFarmeSmaApp"&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;""&lt;/FONT&gt;&lt;FONT size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;false&lt;/FONT&gt;&lt;FONT size=2&gt;); ;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; Catches any unhandled exception within the application and provides a place to log the information&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;///&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;static&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;void&lt;/FONT&gt;&lt;FONT size=2&gt; UnhandledExceptionFound(&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;UnhandledExceptionFoundEventArgs&lt;/FONT&gt;&lt;FONT size=2&gt; e)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;//-- ToDo: add any error logging required. To prevent the StrataFrame ApplicationErrorForm from showing,&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:&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;// e.Handled = true&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Sun, 07 Jan 2007 15:38:32 GMT</pubDate><dc:creator>Ger Cannoll</dc:creator></item><item><title>RE: Login Error</title><link>http://forum.strataframe.net/FindPost5640.aspx</link><description>The MyDatabase is the default database name specified in the AddRequiredDataSource in the AppMain.vb or program.cs file.&amp;nbsp; You need to specify your database in it's place.&amp;nbsp; You can find this in the SetDataSources method in the AppMain.vb or Program.cs file.</description><pubDate>Sun, 07 Jan 2007 12:07:41 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>