Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3613338
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:06:40+00:00 2026-05-18T22:06:40+00:00

I am running ASP.NET connecting to a SQL Server 2005 database. Currently all my

  • 0

I am running ASP.NET connecting to a SQL Server 2005 database.

Currently all my data get’s saved in the database but when I use my HTML editor control (to allow the user to add styles to the text) sometimes I get the following error when I copy text with lots of styles from another website into the text area (error comes up when data is trying to save to database):

String or binary data would be truncated. The statement has been terminated.

Why is this and how do I handle this? Save the text rather to a text file?

The size of the field in the database is big enough!

Edits

INSERT INTO TableName(Name, Age, Comments) VALUES (@Name, @Age, @Comments)

Then from my code behind I simply call my SQLDatasource like so

SqlDataSource.Insert()
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:06:41+00:00Added an answer on May 18, 2026 at 10:06 pm

    It sounds like you are passing a string variable to a stored procedure whit p.e. varchar(250) and the string length is over 251, even if the field in the table is varchar(1025) you’ll get the error because of the param length is not ok.

    Or… Try to use “text” type on db field?

    It’s an idea, if you get more info we’ll be more usefull. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have a database running in SQL Server Management Studio. The server information
I have created my site using ASP.NET Personal Starter Kits 3.5. I use Visual
My set up is as follows IIS + SQL Server Express running on the
I'm in ASP.NET MVC and am (mostly) using Entity Framework. I want to call
I have a very simple app on my local machine that uses the ASP.NET
I'm running the nerddinner MVC application on visual studio, and the database is on
I have a C# Service project where I am connectiong to SQL and retrieving
Hopefully this is not a ServerFault question... I'm working forward on migrating a project
I'm trying to build a visual web part for SharePoint 2010 which should connect

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.