Solved

Error when trying to delete a row

Posted on 2007-11-14
4
1,594 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 43

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

717 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