 |
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
 | This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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
|
|
|
|
|

October 21st, 2013, 10:44 AM
|
|
Authorized User
|
|
Join Date: Apr 2013
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
how to edit and modify a database
hi
these are pictures for a database of a project I worked on last year
now this database needs some modification
renaming a table and some of its fields + adding two tables
note : I build the project and it'd database based on this book
that's why I'm writing in this section
my question is ,, how would I change and modify the database structure in a good way without affecting the functionality of the application
e.g.
the table College --> Section
the field CollegeName --> Section Name
or should i build a whole new database from scratch
I said I would ask first,, instead of messing up
http://www.shy22.com/upfiljpg/m3x66009.jpg
http://www.shy22.com/upfiljpg/brv66009.jpg
|
|

October 21st, 2013, 02:57 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
It depends a bit on how you implemented things, but here's what I would do:
1. Backup everything ;-)
2. Rename the tables / columns / add columns
3. Update the Linq to SQL diagram. This will generate a number of compile errors because of renaming the table.
4. Fix the errors manually
5. Search the site for the table and column names that have changed and update them manually. You're likely to find them within the data controls; the ones in Code Behind should have been caught by the compiler.
Hope this helps,
Imar
|
|

November 12th, 2013, 04:04 PM
|
|
Authorized User
|
|
Join Date: Apr 2013
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
I couldn't rename a table
I'm having a hard time renaming a table
and i couldn't delete it to create it again because of foreign key constraint
now ,, how can i possibly rename it ,, it's been almost 2 hours working at it 
|
|

November 12th, 2013, 06:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Which chapters / exercises is this referring to? Can you provide more information?
Imar
|
|

November 19th, 2013, 05:31 PM
|
|
Authorized User
|
|
Join Date: Apr 2013
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
chapter 11
chapter 11
Introduction to database
Try It Out | Creating Tables in the Table Designer
as I said before ,, I build this database and this website based on this book ,,
http://www.shy22.com/upfiljpg/cn696201.jpg
as shown in the picture ,, I wanna rename the table College ==> Section
and rename its field CollegeName ==> SectionName
I downloaded the sql server management 2005 ,, to be able to modify the database through the object explorer as I searched on the internet
but ,, I don't know why i can't find the library.mdf in the sql server management
http://www.shy22.com/upfiljpg/qow96201.jpg
Now ,, what should I do exactly to rename those two objects ?????????
|
|

November 19th, 2013, 06:57 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
You need to attach the database first. In SSMS, right-click the Databases node, choose Attach and then browse to your .mdf file, wherever it's located.
Cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

November 22nd, 2013, 03:40 PM
|
|
Authorized User
|
|
Join Date: Apr 2013
Posts: 25
Thanks: 6
Thanked 0 Times in 0 Posts
|
|
thnx
Ok ,, I attached it ,, and worked great ,, thanx
can you recommend a good book or a good reference to learn how to use SSMS efficiently
|
|
 |