|
-
Feb 28th, 2006, 07:01 AM
#1
Thread Starter
New Member
Masked Edit Control Sends Unwanted Characters to Database
I'm using a masked edit control for my phone number field. But, when I use the update method of my table adapter to update my database, it sends the parenthesis from the mask to the database along with the phone number digits. Is there an easy way to remove the parenthesis from my dataset phone number field before I call the table adapter update method? Could I use a substring function somewhere to extract only the characters I want? Thanks.
-
Feb 28th, 2006, 07:52 AM
#2
Re: Masked Edit Control Sends Unwanted Characters to Database
The MaskedEditControl has a number of properties that return the text in different ways. I suggest that you test all the likely looking properties to see what they contain until you find the one that is suitable. I'm not trying to be mean by not telling you which one. This is a good exercise in problem solving which will help you solve similar problems in the future.
-
Feb 28th, 2006, 08:39 AM
#3
Thread Starter
New Member
Re: Masked Edit Control Sends Unwanted Characters to Database
I had already tried every conceivable combination of the following properties before posting on here:
textMaskFormat (4 options)
excludePromptsAndLiterals
includePrompt
includeLiterals (default)
includePromptAndLiterals
allowPromptsAsInput
true/false
promptCharacter
The prompt character doesn't seem like the issue. It's the parenthesis in my mask that are causing the problem. I have tried everything I can think of in terms of these properties. Nothing works. Can you help me?
-
Feb 28th, 2006, 04:59 PM
#4
Re: Masked Edit Control Sends Unwanted Characters to Database
ClipText is the text with all the mask literals removed. It is so-named because it is what gets used for clipboard operations. The fact that it has "Text" in the name is what led me to it when I was having the same issue as you many moons ago.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|