Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 16th, 2016, 06:07 AM
Registered User
 
Join Date: Nov 2016
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 12 Id column jumped?

Why is my the auto generated Id jumped to a really large number? I key in from 1-12 and suddenly it went to 1013? How to correct it to normal increment?

http://i63.tinypic.com/ilwzk9.jpg
 
Old November 16th, 2016, 06:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

That's by design in SQL Server. This could happen when SQL Server restarts. Google for it and you'll see any others experiencing the same thing.

If you don't assume that identities are sequential then you're good to go with this. If you need sequential numbers, look into SQL Server sequences.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Column name 'id' is defined for different mapping types realm174 BOOK: Visual Basic 2008 Programmer's Reference ISBN: 978-0-470-18262-8 7 June 7th, 2012 05:09 AM
Why do we add an Id column to our tables? robbaralla BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 8 December 5th, 2009 04:48 PM
how to obtain - for example(page.aspx?id=12) preetham.sarojavenkatesh Visual Studio 2005 4 September 11th, 2007 12:47 PM
identity column id find!! keyvanjan Classic ASP Basics 7 January 20th, 2007 01:12 PM
ID column used to redirect page rdove84 ASP.NET 1.0 and 1.1 Basics 11 November 14th, 2006 05:10 PM





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