﻿<?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 » WinForms (How do I?)  » Connection Wizard appearing</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 00:16:34 GMT</lastBuildDate><ttl>20</ttl><item><title>Connection Wizard appearing</title><link>http://forum.strataframe.net/FindPost16342.aspx</link><description>In the sample as soon as the statement: &lt;FONT color=#2b91af&gt;StrataFrameApplication&lt;/FONT&gt;&lt;FONT size=2&gt;.RunApplication();&amp;nbsp; executes, if the connection info is not found, the connection wizard appears. The project I am working on, the client wants to suppress the wizard from appearing but bring up a form to tell the user to contact the administrator. Is there a way to intercept the logic before the connection wizard displays.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The sample I am referencing is in the program.cs in the security sample.&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;StrataFrameApplication&lt;/FONT&gt;&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;&lt;FONT color=#0000ff size=2&gt;new&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;ShowLoginAndInitializeFormEventHandler&lt;/FONT&gt;&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;&lt;FONT color=#008000 size=2&gt;//-- Run the application&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;StrataFrameApplication&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;.RunApplication();&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Tue, 13 May 2008 09:21:48 GMT</pubDate><dc:creator>Ross L. Rooker, Sr.</dc:creator></item><item><title>RE: Connection Wizard appearing</title><link>http://forum.strataframe.net/FindPost16356.aspx</link><description>SetConnections just lines it all up for you.&amp;nbsp; You can just call the GetActiveConnection strings and manually set the connection.&amp;nbsp; &lt;/P&gt;&lt;P&gt;[codesnippet]If ConnectionManager.GetApplicationActiveConnectionString("MyKey", "").Length &amp;gt; 0 Then&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; '-- You have an active connection&lt;BR&gt;End If[/codesnippet]&lt;/P&gt;&lt;P&gt;Once you have the connection string you can just manually add it to the datasources collection:&lt;/P&gt;&lt;P&gt;[codesnippet]MicroFOur.StrataFrame.Data.Databasics.DataSources.Add(New SqlDbDataSourceItem("",MyConnectionString)[/codesnippet]</description><pubDate>Tue, 13 May 2008 09:21:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Connection Wizard appearing</title><link>http://forum.strataframe.net/FindPost16344.aspx</link><description>SetConnections() does not return any thing, so I don't think you can change this.  I.e. SetConnections() will show the wizard if the connections aren't found in the cached connection file on the user's machine.&lt;br&gt;
&lt;br&gt;
Which means that either they would have to use the wizard at least once OR you would have to distribute this file.&lt;br&gt;
&lt;br&gt;
There are other ways, however.  Most of the time you'll actually manage the connection yourself, using the DataLayer.DataSources() collection.  This allows you lots of flexibility in how you set the connection.  You might search the forum for this, as there are some excellent posts on how this can be done.&lt;br&gt;
&lt;br&gt;
Hope that helps!</description><pubDate>Mon, 12 May 2008 17:38:56 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Connection Wizard appearing</title><link>http://forum.strataframe.net/FindPost16343.aspx</link><description>To further clarify when the Application Run occurs the method &lt;FONT size=2&gt;SetDataSources() executes first and the command: &lt;FONT color=#2b91af size=2&gt;&lt;FONT color=#2b91af size=2&gt;ConnectionManager&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;.SetConnections(); executes. If the connection is not found, that is when the Database Connection Wizard form appears. My question is whether I could test the result before the Connection Wizard appears and then decide whether to go ahead and display the Connection Wizard or to bring up a form informing the user that they need to contact their administrator.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Mon, 12 May 2008 17:15:19 GMT</pubDate><dc:creator>Ross L. Rooker, Sr.</dc:creator></item></channel></rss>