Tony,
>I'm connecting to two different SQL Servers, one local and one on our company network. I have set them up in the app.config file, and when I choose Options, the form appears and I can pick either one. This works all right.
>
>However, what I want to do is to default to my local SQL Server, and just change a variable in Main.vb or somewhere that will set the server without having to choose anything from the Options form. In other words, I want to not choose the UserOptions form.
>
>Is there a variable somewhere that I can use to set the server?
I'm assuming you used MM .NET's DataBase Sets to accomplish this? If so, you can set the DatabaseSetDefault setting in your app.config to the database set you want to default to. For example:
<add key="DatabaseSetDefault" value="LocalSQLServer" />
If you check out the MM .NET Dev Guide topic "The Database Manager", you can set the Database Manager's DatabaseSetKey property dynamically at run time to any valid value.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com