Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using different servers without picking from options
Message
 
To
30/06/2005 19:44:38
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
MS SQL Server
Miscellaneous
Thread ID:
01027971
Message ID:
01028012
Views:
22
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
Previous
Reply
Map
View

Click here to load this message in the networking platform