Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String or Binary data would be truncated
Message
From
21/07/2007 12:23:51
 
 
To
20/07/2007 04:06:18
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01242231
Message ID:
01242559
Views:
30
Are you sure you need your datatype to be "ntext"? It takes up a lot more space than "text". From BOL:

ntext
Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered.


Also, it appears that the ntext, text and image datatypes will go away in future versions of SQL Server (that was news to me, I guess I need to keep up with this stuff better). Again, from BOL:

ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.

~~Bonnie





>>I don't get this one...
>>
>>Using SQL 2005 Express
>>
>>I'm getting a "Error Message: String or Binary data would be truncated" in both the VS 2005 IDE and the SQL Server Management Studio (Dev Version) when I try and edit or delete a record.
>>
>>The field that is causing the error is a ntext field that contains the HTMLBody of some emails. There is no way the data is too long for the field, besides... it's already in the field.
>>
>>VFP Edits the records just fine :P
>>
>>Anyone know is this a limitation of the above mentioned editors, or do I have something objectionable in the field? Something setup wrong?
>
>Fixed the database.
>
>It looks like outlook has null characters in it's data. I added a .Replace("\0","") to the strings when they are being inserted. We'll see if that fixes it.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform