﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / T-SQL (SS2K5)  / Zero being inserted in identity column / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 20 Jun 2013 00:30:53 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Zero being inserted in identity column</title><link>http://www.sqlservercentral.com/Forums/Topic878768-338-1.aspx</link><description>[quote][b]ramadesai108 (3/8/2010)[/b][hr]I Apologize. The reason why i started this thread is because the previous thread is under Administration. I have not received any solution from there so i thought a T-SQL developer may know rather than an administrator.[/quote]Please go back to the other thread and respond to the latest queries I posted.</description><pubDate>Mon, 08 Mar 2010 12:23:11 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Zero being inserted in identity column</title><link>http://www.sqlservercentral.com/Forums/Topic878768-338-1.aspx</link><description>There are 14 total replies to the other thread, most by people who know a lot (and I mean a lot) about T-SQL development. If there's no solution yet it's because the problem is difficult, not because they are not developers.Many of the regulars read all the forums. Cross posting is frowned on in most internet forums, it just wastes people's time as they answer stuff that's been answered elsewhere.</description><pubDate>Mon, 08 Mar 2010 12:16:43 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: Zero being inserted in identity column</title><link>http://www.sqlservercentral.com/Forums/Topic878768-338-1.aspx</link><description>I Apologize. The reason why i started this thread is because the previous thread is under Administration. I have not received any solution from there so i thought a T-SQL developer may know rather than an administrator.</description><pubDate>Mon, 08 Mar 2010 11:20:14 GMT</pubDate><dc:creator>ramadesai108</dc:creator></item><item><title>RE: Zero being inserted in identity column</title><link>http://www.sqlservercentral.com/Forums/Topic878768-338-1.aspx</link><description>Please don't start a new thread when there's still an active discussion in the previous one you started.No replies to this thread please. Direct replies to the existing active thread at [url]http://www.sqlservercentral.com/Forums/Topic876907-146-1.aspx[/url]</description><pubDate>Mon, 08 Mar 2010 10:48:40 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>Zero being inserted in identity column</title><link>http://www.sqlservercentral.com/Forums/Topic878768-338-1.aspx</link><description>Hi,I have an identity column where the identity seed is 1 and identity increment is 1. When i insert a record from a web application, it enters zero in the identity column. This is a brand new table which i created using the following script. I have also used the exact same script in the past without any problems. Any ideas? Table DefinitionSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE TABLE [dbo].[customers]([ID] [int] IDENTITY(1,1) NOT NULL,[Name] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[Description] [nvarchar](300) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[ContactPhone] [nvarchar](12) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[Email] [nvarchar](75) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,[Street] [nvarchar](75) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[City] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[Zip] [nvarchar](12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,[StateID] [int] NULL,[Created] [datetime] NOT NULL CONSTRAINT [DF_clients_dteCreate] DEFAULT (getdate()),CONSTRAINT [PK_customers] PRIMARY KEY CLUSTERED ([ID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]Stored Procedure to insertSET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE PROCEDURE [dbo].[sp_insCustomers]-- Add the parameters for the stored procedure here(@Name nvarchar(50),@Description nvarchar(300),@ContactPhone nvarchar(12),@Email nvarchar(75),@Street nvarchar(75),@City nvarchar(50),@Zip nvarchar(12),@StateID int)ASBEGINSET NOCOUNT ON;INSERT INTO [dbo].[customers]([Name],[Description],[ContactPhone],[Email],[Street],[City],[Zip],[StateID])VALUES(@Name,@Description,@ContactPhone,@Email,@Street,@City,@Zip,@StateID)select @@IdentityEND Here is another user who is complaining the same thing:http://www.generation-nt.com/us/instead-insert-inserted-identity-column-0-help-116980361.html Thanks.Thanks.</description><pubDate>Mon, 08 Mar 2010 10:32:46 GMT</pubDate><dc:creator>ramadesai108</dc:creator></item></channel></rss>