Hello friends
I have done web applications using layered technology but first time going for
windows application.where i got many douts
first think as we hav web.config in webapplication we can go for a global connection string and we can use where ever it is nedded but how this can be solved in windows application what is best method to follow
is there any good architecture regarding windows application to follow
hope that some will up with the solution...
thanks and regards
nmsreddi
Hi,
You need to create the Application configuration file in your project.
Right click on the project. Select Add->New Item->Application Configuration File and click on the Add button. The file named App.Config file is going to add to your project.
Type the following code in the Config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Northwind" value="data source=localhost;initial catalog=Northwind;password=;persist security info=True;user id=sa;workstation id=CPU-TENOTEBOOK;packet size=4096" />
</appSettings>
</configuration>
And type the following code in the the form.
Dim dbpath As String = ConfigurationSettings.AppSettings("DatabasePath")
Books for programmers,
http://www.vkinfotek.com
Regards
madhav