Truncating string values on Save


Author
Message
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,



We had a curious issue today. A form exceptioned because column length value (by mistake) in the database was too short - just 20 characters when it should have been 100.



The database was corrected but in testing I noted that when I entered 40 characters what is saved to the database is 22 characters. If enter 40 characters in EM then no problems so it is something in the form. So, I assume the truncation must be happening in the BO and what I didn't do is remap and compile the BO after I changed the column length.



So, a few questions:



1) Does SF trim form data to the maximum a column can accept during the Save operation.



2) If 1 is true then after changing column lengths does the associated BO need to be recompiled.



3) If 2) is true then it would appear there may be a bug in the SF code in that a nvarChar(20) column is being saved with 22 characters not the 20 as was originally mapped.



BTW we use DevExpress but I can't see how that would effect things.



Cheers, Peter
Replies
Peter Jones
Peter Jones
Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)Advanced StrataFrame User (718 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Bump...



I was hoping a SF guru could through some light on why the 22 character truncation and why a BOM rebuild fixed the problem.



Cheers, Peter
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Peter Jones (01/26/2010)
I was hoping a SF guru could through some light on why the 22 character truncation and why a BOM rebuild fixed the problem.




Well I am not a SF guru, but I would say that what you have seen has to do with the functionality of SF to adjust the max length for character fields (see the TextBox.AutoAdjustMaxLenght propery help).



The fact that by rebuilding the BO fixed the problem for you, it does reflect the behavior of having this property set to True.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search