twjolson & Kay Posted August 12, 2005 Share Posted August 12, 2005 I tried to edit my cache "The Famous Beale Cipher" and add one line to it. But when I submit the changes I get this error page. Server Error in '/' Application.String or binary data would be truncated. The statement has been terminated. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: String or binary data would be truncated. The statement has been terminated. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [sqlException: String or binary data would be truncated. The statement has been terminated.] System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +180 Groundspeak.Web.SqlData.SqlConnectionManager.ExecuteNonQuery(String sql, Database database) +149 Groundspeak.Web.SqlData.SqlGeocacheController.Save(Int64 CacheID, String Nickname, DateTime DatePlaced, Int64 OwnerID, Int64 ApproverID, Double Latitude, Double Longitude, String ContactName, Uri URL, Double TerrainLevel, Double DifficultyLevel, Int32 CountryID, Int32 StateID, Boolean IsHtml, Int32 SiteTypeID, String ShortDescription, String LongDescription, String EncodedHints, Int32 ContainerID, Boolean IsSubscriberOnly, String BackgroundImageURL) +1419 Groundspeak.Web.CustomWpt.Geocache._Save(Int64 CacheID, String Nickname, SimpleUser Owner, Int64 ApproverID, WptBase Wpt, String ContactName, DateTime DatePlaced, Uri URL, Double TerrainLevel, Double DifficultyLevel, Int32 CountryID, Int32 StateID, Boolean IsHtml, Int32 SiteTypeID, String ShortDescription, String LongDescription, String EncodedHints, Int32 ContainerID, Boolean IsSubscriberOnly, String BackgroundImageUrl) +127 Groundspeak.Web.CustomWpt.Geocache.Save() +132 Geocaching.UI.hide_report.UpdateCacheFromForm() +1871 Geocaching.UI.hide_report.btnSubmit_Click(Object sender, EventArgs e) +3547 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1330 Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032 Link to comment
Jeremy Posted August 12, 2005 Share Posted August 12, 2005 This happens when you have too much text in one of your text boxes. It is odd since I do check for file length though with the recent HTMLTidy addition it may be adding additional spaces for formatting and close tags. I'll see if I can have Tidy work then check for text length before sending it to the database. Thanks for the error message. Link to comment
twjolson & Kay Posted August 13, 2005 Author Share Posted August 13, 2005 The box I want to add more text too is the main box, which doesn't have that much, other caches have alot more. So is it amount of letters, or number of lines on the screen after the cache page is generated and displayed? Or could the first text box, the intro box, have too much (even though I never got an error message before, and thus when I add more to any box it errors out? Link to comment
Jeremy Posted August 13, 2005 Share Posted August 13, 2005 The max length for the short description is 500 characters. That includes spaces, carriage returns, etc. When you make it HTML it also includes open and close tags. If you added a font and forgot the </ font tag, it will add it for you.. that sort of thing. Link to comment
twjolson & Kay Posted August 13, 2005 Author Share Posted August 13, 2005 (edited) Thanks, I'll make due. For an idea though, maybe you could put in some scripts on the cache edit page that counts down your remaining letters? I've seen that several places and it's really helpful. I did manage to skim down the text and fit one last sentance in, so I'm golden, thank you. Edited August 13, 2005 by twjolson & Kay Link to comment
Recommended Posts