Wrox Programmer Forums
|
BOOK: Beginning SQL Server 2005 Programming ISBN: 978-0-7645-8433-6
This is the forum to discuss the Wrox book Beginning SQL Server 2005 Programming by Robert Vieira; ISBN: 9780764584336
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning SQL Server 2005 Programming ISBN: 978-0-7645-8433-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 January 31st, 2007, 10:07 PM
Authorized User
 
Join Date: Dec 2006
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default DBCC error? Chap 9 page 283

Can anyone get this to execute?

USE Northwind
GO
DBCC SHOWCONTIG (@id, @IdxID)
GO


I get the following error:
Msg 137, Level 15, State 2, Line 1
Must declare the scalar variable "@id".


Books Online says to use OBJECT_ID to get the ID, (which I could insert in the above command, but I couldn't get that to work either. I kept getting a null value returned.


Thanks, Brian

Sincerely,
Brian
__________________
Sincerely,
Brian
 
Old January 31st, 2007, 10:13 PM
Authorized User
 
Join Date: Dec 2006
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind, got it...

do it like this:
USE Northwind
GO

DBCC SHOWCONTIG ([Order Details], PK_Order_Details)
GO


Sincerely,
Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 8 in VB.NET page 283 jensam BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 August 19th, 2008 08:02 AM
chap 16 Page 631 audreiev BOOK Beginning Linux Programming, 3rd Edition 0 July 7th, 2007 08:40 PM
Chap 19 Page 957 Lostincode BOOK: Ivor Horton's Beginning Visual C++ 2005 1 March 22nd, 2007 05:08 PM
Chap 3 , page 50 MacSr BOOK: Beginning VB.NET Databases 1 January 23rd, 2006 08:53 PM
Chap 17, page 609, error -- stumped HartfordDeveloper BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 1 December 8th, 2005 11:52 PM





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