Solved

Error when trying to delete a row

Posted on 2007-11-14
4
1,589 Views
Last Modified: 2009-12-16
Hello all,

my website's forums built on asp.net give me a problem recently.
When new users add a new post, the post does not contain the user's id
and it gives an error on the website.
Now, I have identified the 2 posts that give me the error. Both have as user id=0
This is the mistake. When I'm trying to edit or delete these rows, I'm getting the following error message
in SQL Server Studio:

No row was updated.
The data in row 774 was not committed.
Error source: .NET SqlClient Data Provider.
Error message: String or binary data would be truncated.
The statement has been terminated.

Correct the errors and try/ press esc to cancel the changes.

Any ideas how to fix this?
0
Comment
Question by:nectarios777
4 Comments
 
LVL 8

Accepted Solution

by:
digital_thoughts earned 500 total points
ID: 20279951
Most likely you are trying to add/update a row with a value that is longer than the data field, like a varchar(50) but you are trying to but in a 60 character string.
0
 
LVL 42

Expert Comment

by:Eugene Z
ID: 20279974
<Error message: String or binary data would be truncated.>

You need enlarge your table colum size:
for example:
 you have column [Address]varchar(50)-> you need to make it varchar(1000)
0
 
LVL 1

Author Comment

by:nectarios777
ID: 20280154
Ok, my value is ntext. I have changed it to nvarchar(MAX) but I can't edit the record.
How would I delete/edit it?
0
 

Expert Comment

by:chlade
ID: 23069658
I am currently digging into the same issue.  This link provides interesting information.  I'm still looking for a little better answer, but I'm not sure if I'll find one.  (Scroll to the last comment.)

http://www.mydatabasesupport.com/forums/ms-sqlserver/141619-row-updating-error.html
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
getting error Subquery returned more  than 1 value 6 24
How can I find this data? 3 27
SQL Server Sum Over Multiple Tables 20 33
access to sql migration 5 24
Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question