如何防止重复输入 [英] How to prevent duplicate entry
本文介绍了如何防止重复输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个使用链接到访问数据库创建的用户表单。我有一个名为PV Numbers的列标题。我想知道如何阻止用户复制PV号码。
我尝试过:
我目前使用的代码是GBCPVRBindingSource.AddNew
i have a user-form created using linked to an access database. i have a column header named "PV Numbers". i would like to know how i can prevent users from duplicating the PV Numbers.
What I have tried:
The code am currently using is "GBCPVRBindingSource.AddNew"
推荐答案
数据库中的每个表必须具有主要密钥 [< a href =https://support.office.com/en-gb/article/Create-or-remove-a-primary-key-07b4a84b-0063-4d56-8b00-65f2975e4379#bm1\"target =_ blanktitle =新窗口> ^ ]这就是你要找的。
了解更多: SQL PRIMARY KEY约束 [ ^ ]
Every table in a database must have a primary key[^] and that is what you are looking for.
Learn more: SQL PRIMARY KEY Constraint[^]
正如彼得所说,主键就是这样。
你需要学习更好的SQL。
SQL教程 [ ^ ]
W3Schools在线网络教程 [ ^ ]
As Peter said, "Primary key" is the way.
You need to learn better SQL.
SQL Tutorial[^]
W3Schools Online Web Tutorials[^]
这篇关于如何防止重复输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文