c#


Prevent user from adding same values to the database


I am developing an Attendance Monitoring System with register module. Every time I click the register button for the 2nd time, it inserts a new row, but it should prevent the user from doing so. I am using C# with MS Access
To prevent duplication of data:
Use Primary Key Constraints.
This is the only way to hold any duplicate Primary Key value.(No more insertion happen again if value exists.)
Create a method to retrieve a list of names from MS Access, then when the user tries to add a new value to MS Access, compare the value they have entered with the values stored in your list. If the new value matches an already existing value, don't execute the insert code.

Related Links

Get index of random matching value
Incorrect Syntax near ' '.C#
MVC DropDownList Select Populates ListBox (Both Selects)
Include Database with the Application [closed]
Adding User to Organization Unit and Group using Google Apps Provisioning API
How to send group emails asp.net/C# depending on select query
How to control(access) the streams of TcpClients within the threads [closed]
Collision in Unity3d in an intervall?
Does NServiceBus v5.0 require performance counters?
Sleep until file exists/created
Errors with new MVC5 project in Visual Studio 2013.3
C# TableLayout doubling in height when adding rows?
Real time communication and debugging between Matlab and Visual Studio C# .NET
My service doesn't get my mocked DbContext through its constructor
WPF Canvas as a math graphing area
jQuery post to c# without form

Categories

HOME
c#
excel-formula
ftp
sql-server-2014
intellisense
c++builder
x86-64
yuv
symfony-3.2
python-3.4
qt4
rtc
aws-sdk-cpp
mamp
camunda
minimum
serenity-js
android-cursorloader
pushpad
r-factor
semantic-ui-react
selenium3
jql
availability
jsonapi-resources
offset
dropdownbox
geocomplete
multi-user
client-server
word-wrap
origami
tapply
vertical-alignment
datagridviewcombobox
taiga
codepen
angular-fullstack
npoco
jks
spring-cloud-bus
flask-socketio
openidm
runtime-permissions
htop
timefield
android-tabs
glade
easy68k
universe
visual-web-developer
hotkeys
code-translation
magnet-uri
maven-antrun-plugin
sdkman
libgcrypt
random-sample
notice
self-join
transparentproxy
genome
httpmodule
maven-archetype
firebase-tools
numerical-recipes
shunting-yard
pysvn
launcher
register-allocation
go-gin
zoneminder
powerpoint-2010
pnunit
twitter-finagle
html5-filesystem
caroufredsel
azure-pack
maven-webstart-plugin
wordbreaker
ftpwebrequest
generator-expression
invalidoperationexception
waveout
unordered-set
pinchzoom
idtabs
zend-validate
symfony-1.2
method-call
mysql-logic
newspeak
mysql-pconnect
rpxnow

Resources

Encrypt Message