SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

sqlbug
Posting Yak Master

Canada
194 Posts

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

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.

Sqlbug

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

chadmat
The Chadinator

USA
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.

-Chad
Go to Top of Page

Lamprey
Flowing Fount of Yak Knowledge

4361 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

sqlbug
Posting Yak Master

Canada
194 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  
 New 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.03 seconds. Powered By: Snitz Forums 2000