Linux 如何在 SQL Windows 中验证 AZ、0-9 和“*”的数据字段?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3677176/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-03 23:23:02  来源:igfitidea点击:

How to validate a data field for A-Z, 0-9 and "*" in SQL Windows?

validationguptateamdevelopercentura

提问by Paulo Guedes

I'm trying to define the input mask for a field in SQL Windows. I now that setting "AAA" would make the field accept anything from A to Z; "999" would make it accept any number. But how do I make it able to accept the "*" char?

我正在尝试为 SQL Windows 中的字段定义输入掩码。我现在设置“AAA”将使该字段接受从 A 到 Z 的任何内容;“999”将使其接受任何数字。但是如何让它能够接受“*”字符?

采纳答案by Stephan Keller

AFAIK you can't. At least according to the SQLwindows 2.1 documentation input masks only support numbers and alphabetic characters.
Have you considered creating your own class? Intercepting the SAM_AnyKey-message and checking the characters against your mask should do the trick.

AFAIK 你不能。至少根据 SQLwindows 2.1 文档输入掩码只支持数字和字母字符。
您是否考虑过创建自己的类?拦截 SAM_AnyKey 消息并根据掩码检查字符应该可以解决问题。