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)
 Primary Key is not allowing me to increase size >4

Author  Topic 

AmericanD
Starting Member

4 Posts

Posted - 2005-01-06 : 16:20:41
Its my first time i am trying out C#/ASP.NET/SQL2000, and was able to retrieve and update/insert results and stuff like that. although i really miss the "Documentation" style of php and others and getting used to MSDN documetnation style which is more graphics and less of usefull content.

Anyway I'm trying to design my first SQLServer DB and the primary key field is not allowing me to increase the data size greater than 4. Any articles or documentation i can read up on that ? Its frustrating searching for answers on microsoft sites because they just lack how to present the documentation in an easy accessible way.

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2005-01-06 : 16:32:29
I assume you are referring to an INT datatype which is 4 bytes and cannot be altered. SQL Server Books Online is a very good resource for all things SQL Server.
Go to Top of Page

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2005-01-06 : 16:38:44
What is the datatype of your Primary Key column(s)? It is common enough to use an INT which has a static datasize of 4 and a data range of -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647). You can use a BIGINT which is (would ya believe it?) bigger than an INT or DECIMAL which let's you define bigger numbers, also.

Alternately, you can use one of the string datatypes (CHAR, VARCHAR, NCHAR or NVARCHAR) which let you define the size used.

There are other data types that you could use but I think you see that you have options.

HTH

=================================================================

A faith that cannot survive collision with the truth is not worth many regrets. -Arthur C Clarke, science fiction writer (1917- )
Go to Top of Page

AmericanD
Starting Member

4 Posts

Posted - 2005-01-06 : 16:40:03
Thank you guys. Yes i have subscription to safari online bookstore so i am also reading books there.

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-01-06 : 16:51:20
SQL Server Books Online is free though. You get it when you install the SQL client tools. So look in the Microsoft SQL Server program group on your computer for it.

Tara
Go to Top of Page

AmericanD
Starting Member

4 Posts

Posted - 2005-01-06 : 16:52:31
Honestly I dont know where to find it on the server or on this dev machine. Do u know the location of the folder for the book?

let me add, this machine was setup for me by our technician. maybe i need to ask him to put the books in here which he may have forgotten to do so
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-01-06 : 16:55:13
Click Start..All Programs..Microsoft SQL Server...Books Online

Tara
Go to Top of Page

AmericanD
Starting Member

4 Posts

Posted - 2005-01-06 : 16:59:14
Oh yeah never thought microsoft would give something for free.. pleasently surprized

thanks
Go to Top of Page
   

- Advertisement -