StrataFrame Forum

Connection String Management

http://forum.strataframe.net/Topic3718.aspx

By Tim Dol - 10/20/2006

I stumbled across a problem while testing my application on a user machine. When you run the application for the first time, the connection manager screen appears and you can select the connection details...No Problem.

What if the user selects the wrong database and proceeds with accepting the connection.  The next time the app runs, the connection manager does not appear so you cannot correct the connection. 

Is there a StrataFrame utility or program we can ship along with the app to correct this...

What is the best way to handle this?

By Ivan George Borges - 10/20/2006

Hi Tim.

Are you using the SF Main Form?

Have you tried in it the File/Database Conection menu option?

But probably the guys will direct you properly.

By Trent L. Taylor - 10/20/2006

If you created an SF main form, Ivan is correct there is already a link in the File menu item that says "Data Connection..." that will bring up the connections.  But all you need to do is call the following:

MicroFour.StrataFrame.Data.ConnectionManager.ShowAvailableConnectionStrings()

You can see more about this in the documentation under the following link in the Contents:

Application -> WinForms -> Connection Strings -> Application Database Connections

By Tim Dol - 10/20/2006

Thanks guys, this is exactly what I wanted.

I am using the MaintenanceFormBarManager Control and added a main menu bar above the Maintenance Form Toolstrip with the database connection menu link.  Everything works fine except during execution the Maintenance Form Toolstrip docks above the menu bar, which doesn't look very nice, even though in design-time the menu is docked above.

I can't seem to correct this...Any idea's 

By Trent L. Taylor - 10/20/2006

This is one of my gripes about the DevExpress XtraBars...they are pain to work with!  It is possible to make this happen, but sometimes it takes a little coercing.  You may even have to go to the length of sending the MenuBar or Toolbar to back when the form is loading:

MyToolbar.SendToBack()

You will just have to play with the Z-Order.  Nothing fancy that I can tell you on this one. Ermm

By Tim Dol - 10/26/2006

I've tried everything to get the main menu to stay above the standard toolbar and nothing seems to work. The DevExpress control itself works fine so I don't understand why the inherited control doesn't work.

Does anyone have a solution for this? 

By Tim Dol - 10/27/2006

Found solution. Add the following code after the component is initialized and the main menu will position itself back on top of the Maintence Tool Bar.

Me.Bar1.DockRow = 0

Me.Bar1.DockCol = 0

Me.Bar1.ApplyDockRowCol()

By Trent L. Taylor - 10/27/2006

Great!  Thanks for the tip.