Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 November 20th, 2006, 07:52 AM
Registered User
 
Join Date: Nov 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Appointment Booker Database Naming Question

Hi,

I am trying to change the name of the default database in the Chapter 10 Appointment booker.
I change the database name in Solution Explorer, then make an identical change in the Web.config file.
When I then try running the application, (on the local machine) I am unable to login.
Is there a correct procedure when changing the ASPNETDB name?

Thanks,

Lawrence.
 
Old November 21st, 2006, 02:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The database in the App_Code folder (ASPNETDB.MDF) has been created by .NET for you automatically. Once this database has a different name, you also need to override the configuration settings for this database.

You either need to <clear /> or remove the existing one then add a connection string called LocalSqlServer andd give it the new settings.
In your connection string settings:

<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionstring=" Your conn string to the database" />

Alternatively, you can completely override the configuration for the providers. For an example of this, look in the web.config file for the BugBase application (chapter 12)

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old November 21st, 2006, 05:05 AM
Registered User
 
Join Date: Nov 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,

Thank You very much for the advice, that's a great help.

Lawrence.
 
Old November 21st, 2006, 06:40 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You're welcome.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Appointment Book Security Database afuentes BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 11 November 15th, 2008 08:37 AM
host has preset database naming convention crmpicco PHP Databases 0 October 23rd, 2007 01:14 PM
Variables in the four naming conventions FJInfante SQL Server 2000 3 May 1st, 2006 01:06 PM
Naming a new table SKE Classic ASP Databases 2 March 23rd, 2005 03:25 PM
Naming conventions jara VS.NET 2002/2003 3 June 22nd, 2003 04:21 AM





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