Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 13th, 2005, 01:54 PM
Authorized User
 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Database schema in configuration files

I often find myself changing my database schema, and consequently, the stored procedures and code in my asp.net app.

So I am thinking: can I include some sort of database schema in my configuration files, such as:

<?xml version="1.0"?>
<ModuleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ConnectionString>server=localhost;database=ThePhi le;Trusted_Connection=True;</ConnectionString>

<database>
<table1>
<columns>
<column name="column1" DBType="NVarChar" size="20"/>
.....
</columns>
</table1>
</database>
</ModuleSettings>

My question is: if I go for the above approach, what is the best way to access the above information. For example, can I change ModuleSettings.cs to read this information.

Hope to hear from u. thanks

 
Old March 15th, 2005, 02:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Yes you can, through a custom configuration section handler.

http://www.dotnetjohn.com/articles.aspx?articleid=185

Brian
 
Old March 15th, 2005, 06:55 PM
Authorized User
 
Join Date: Mar 2005
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Application Configuration Files semilemon C# 2005 17 April 24th, 2007 10:27 PM
Configuration Override Files Jeff Mason Visual Studio 2005 1 March 14th, 2007 08:52 AM
Configuration files and performance ernestlambert BOOK: ASP.NET Website Programming Problem-Design-Solution 1 April 21st, 2005 11:23 AM
Configuration files hasanali00 BOOK: ASP.NET Website Programming Problem-Design-Solution 2 March 23rd, 2005 09:13 AM
Using multiple configuration files Johan VS.NET 2002/2003 0 November 10th, 2003 12:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.