Sze,
>Is there a way that we can hide it or encrypt the connection string? it would be good if we can store the encrypted connection string in Registry File.
The next release of MM .NET includes encryption of application settings (thanks to Rick's new configuration class).
>I also understand that we can point to multiple database or server by using databasekey property in each project. Nevertheless, we are require to specify one default security database only and it seems there are no way to query other security database during run time once we specify the default security database key. Can i point to different database/server including the securiy database/server? this is required if i have 2 set of server/database to perform testing and production database. it will be unwise if i am required to compile 2 diff exe to cater for testing and production system. i want to develope a system that can choose to connect to different server/ database during login session.
Yes you can, by using Database Sets in the configuration file. For example:
<databaseSets>
<add key="Testing" value="Test Database"/>
<add key="Production" value="Production Database" />
</databaseSets>
<databases>
<add key="Testing\Northwind\Connection" value="server=(local);uid=sa;pwd=;database=Northwind;" />
<add key="Testing\Security\Connection" value="server=(local);uid=sa;pwd=;database=Security;"/>
<add key="Production\Northwind\Connection" value="server=(local);uid=sa;pwd=;database=Northwind;" />
<add key="Production\Security\Connection" valueserver=(local);uid=sa;pwd=;database=Security;" />
</databases>
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com