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
 General SQL Server Forums
 Database Design and Application Architecture
 Text Field Length 16 problem

Author  Topic 

Fonzyy
Starting Member

5 Posts

Posted - 2008-09-18 : 06:02:22
Hello,

In a database field i have set the properties Text field and Max length is 16.
So now one user added text info in this field with lot of characters. When i open the database i see in the database nothting (field seems to be empty), but in the application which is behind i see the data. Does anyone know the limit of characrers for this kind of field ? Thank you....

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-18 : 06:20:12
I would advice you to use varchar instead

http://msdn.microsoft.com/en-us/library/ms187993.aspx
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-18 : 06:22:39
Also see
quote:

Use varchar/nvarchar columns instead of text/ntext columns whenever possible. Because SQL Server stores text/ntext columns on the Text/Image pages separately from the other data, stored on the Data pages, it can take more time to get the text/ntext values.



http://www.databasejournal.com/features/mssql/article.php/2212141
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-09-18 : 06:53:02
The 16 that's listed for Text is the size of the pointer, not the size of the text field. That's limited to 2 GB (iirc)

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -