-
Connection to SQL
Hi,
I am using VB.NET to create an application with SQL Server as backend. I have read some articles on putting the connection string in a config or xml file so that the database location can be easily changed in future. But I dont know how to go about it.
I also wish to create more than one application that uses the same database. These different applications will be used by more than one user at the same time. How can I go about this? Please help.
Thanks
-
in your config file under the <configuration> xml tag
you can something like this
<appSettings>
<add key="connString" value="your connection string refer msdn"/>
</appSettings>
In your code import System.Configuration namespace
then access this string ConfigurationSettings.AppSettings["connString"]
and then use to do the database connection
Sri
Similar Threads
-
By rperez in forum Database
Replies: 5
Last Post: 01-02-2009, 04:14 PM
-
By Aditya Sanghi in forum VB Classic
Replies: 0
Last Post: 04-29-2002, 07:43 AM
-
By David Jones in forum Database
Replies: 0
Last Post: 08-31-2001, 12:22 PM
-
By Richard in forum ASP.NET
Replies: 0
Last Post: 01-12-2001, 11:20 AM
-
By Devaraj in forum Enterprise
Replies: 0
Last Post: 05-11-2000, 12:48 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks