Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 data in the varchar field being truncated
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

201 Posts

Posted - 04/05/2013 :  11:55:19  Show Profile  Reply with Quote

I've this table with a field specified as type varchar(2500). But when data is saved to the table - they are truncated to size 500.
I double checked the saving part and there is nothing in the stored procedure or in the code that can cause this.
So I'm puzzled what I am missing.

Need help please. Thanks.


Edited by - sqlbug on 04/05/2013 11:56:03

The Chadinator

1974 Posts

Posted - 04/05/2013 :  12:00:37  Show Profile  Visit chadmat's Homepage  Reply with Quote
There is not much for us to go on here. I guess we are taking your word for it that "...there is nothing in the stored procedure or in the code that can cause this..."

But I suspect there actually is.

Go to Top of Page

Flowing Fount of Yak Knowledge

4614 Posts

Posted - 04/05/2013 :  12:01:02  Show Profile  Reply with Quote
Without any code to look at and your assurance that the code is good, I'd take a look at what is calling the stored procedure and see if anything is happening before the call.
Go to Top of Page

Posting Yak Master

201 Posts

Posted - 04/05/2013 :  12:42:07  Show Profile  Reply with Quote
Hi Chad and Lamprey - I believe I found the reason. That field length was increased to 2500 at some point and the stored procedures were updated to match that, but the dataset was not updated. As a result - the MaxLength property for that field in the dataset was still 500. So I updated the dataset.
I haven't tested yet.
If problem persists, I'll be back with more information.

In the meantime - thanks for your offers to help.
Appreciate it, see you again.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000