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 May 11th, 2012, 11:42 AM
Authorized User
Join Date: Dec 2007
Posts: 48
Thanks: 4
Thanked 0 Times in 0 Posts
Default Source files for diarydb stored procedures


I am unable to get Sql Server 2008 and Visual Studio 2008 to add the diarydb from the source download. I have created the db and associated tables, however, I still need the stored procedures. I'm wondering if the source code for these are available before I recreate the wheel from the program code.

Thomas G Magaro

Last edited by flashmanTom; May 11th, 2012 at 11:45 AM.. Reason: Error in grammar
Old May 12th, 2012, 05:12 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

I don't think the code for the stored procedures is available separately. However, you can retrieve them from the database if you can attach it to SQL Server, like this:

1. Create a folder called C:\Databases and copy the DiaryDB.mdf into this folder
2. Using Windows Explorer open the Properties for this folder and on the Security tab provide full control to the Everyone account. This isn't a best practice but works well for this task.
3. Start SQL Server Management Studio and log in
4. Right-click the Databases node of your server and choose Attach
5. Browse to C:\Databases\DiaryDB.mdf
6. In the list of files at the bottom, click the row for the Log file and then click Remove. This way, the LDF will be ignored and the MDF gets attached.

That should do the trick and you should now be able to look at the procedures.

Let me know if this doesn't work for you.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
flashmanTom (May 12th, 2012)
Old May 12th, 2012, 07:48 AM
Authorized User
Join Date: Dec 2007
Posts: 48
Thanks: 4
Thanked 0 Times in 0 Posts

Hi Imar,

Once again, you have come through. This helps with several books where I recreated the databases for.

Many thanks,

Thomas G Magaro

Similar Threads
Thread Thread Starter Forum Replies Last Post
stored procedures kirangentlebreeze1987 Visual Web Developer 2008 2 August 30th, 2010 07:26 AM
Stored Procedures umeshtheone SQL Server 2000 0 June 19th, 2007 01:08 AM
stored procedures thillaiarasu ASP.NET 2.0 Basics 2 May 3rd, 2007 07:55 AM
Stored Procedures itHighway SQL Server 2000 3 November 23rd, 2005 10:08 AM
Stored Procedures stu9820 Access 3 February 8th, 2004 01:13 PM

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