Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem with primary key

Author  Topic 

anupalavila
Yak Posting Veteran

56 Posts

Posted - 2009-01-17 : 04:06:48

Hai
In my table i have two fields Id and Amount, in which Id is the primary key datatype numeric with autoincrement yes identity seed 1.
When I tried to enter 200 values for amount its showing error after value 116 and also Id is not shown after 100.What can I do to solve this problem

My table scrip is given below

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Test]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Test]
GO

CREATE TABLE [dbo].[Test] (
[Id] [numeric](18, 0) IDENTITY (1, 1) NOT NULL ,
[Amount] [decimal](18, 0) NULL
) ON [PRIMARY]
GO



Thanks and Regards
Anu Palavila

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-17 : 04:13:14
do you have any other constraints present on table? use sp_helpconstraint Test for finding it. ALso why is Id declared as numeric rather than int if its an identity column with seed 1?
Go to Top of Page

anupalavila
Yak Posting Veteran

56 Posts

Posted - 2009-01-17 : 06:19:49
sorry visak the problem was my C# application

Thanks and Regards
Anu Palavila
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-17 : 06:34:51
have you sorted it out?
Go to Top of Page
   

- Advertisement -