Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP 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 4th, 2005, 03:29 AM
Authorized User
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Autoincrement field not incrementing

Hi all,
I have a database in which certain tables have the id field of autoincrement type. The site was running fine for 2 years but now suddenly it has started generating error in all autoincrement fields.
The error is in insert queries where insertion takes place(not including the autoincrement fields).
Error: 'Cannot insert NULL values in field" which happens to be the id field.

What might be the reason ?
The same database is working fine at my local machine.


regards

Vinay

 
Old January 4th, 2005, 08:07 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

You may try and check your table properties for changes the

1.Identity set to yes
2.Identity seed has value
3.Identity Increment has a value
4.Check for triggers that may be inserting or changing values

Jaime E. Maccou





Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoIncrement Aaron Edwards ASP.NET 2.0 Basics 5 February 7th, 2007 02:37 PM
setting autoincrement tbecker82 Access 3 June 20th, 2006 01:17 PM
PrimaryKeys, AutoIncrement gbilios VB.NET 2002/2003 Basics 4 June 9th, 2005 07:31 AM
Append records with 1 incrementing field Mitch SQL Language 3 May 26th, 2005 08:40 AM
Generated dataset and autoincrement dbradley ADO.NET 5 February 2nd, 2005 01:14 AM





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