Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error due to exceeding length w/ custom mask
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error due to exceeding length w/ custom mask
Environment versions
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01398477
Message ID:
01398477
Views:
80
I tried using the phone mask for the masked text box. I want the user to be able to add an extension. My field length is 20. When I use the built in mask of (999) 000-0000, it won't allow entry of anything after the mask. I tried adding spaces to the end of the mask, but it still didn't allow entering extra characters. If I create a custom mask of (999) 000-0000AAAAAA, it allows the entry of additional characters. However, it appears to add all those characters to the actual length of the data field, so it returns an error that the value exceeds the maximum size for the column, even though I entered (123) 456-7890 X1234, which is exactly 20 characters, including the mask. I changed the TextMaskFormat from "IncludePromptsAndLiterals" to "IncludeLiterals" and still have the same problem. It works fine if I change it to "ExcludePromptsAndLiterals". I was thinking of including the special characters, though, since the data I'll be importing has all those characters in it, plus it would just make life easier for ad hoc reporting. It seems like there ought to be a way to set up the mask so the first part has to be entered a certain way but the rest can be entered without restriction. Any suggestions?
Linda Harmes
HiBit Technologies, Inc.
Reply
Map
View

Click here to load this message in the networking platform