Microsoft
Software
Hardware
Network
Question : How to prevent duplicate records on the form UI?
I have a form, the query behind the form is like:
select field1, field2, field3, field4... field8 from tblTest
On the form, it's possible there are two records which have the same field values: field1 ... field 8.
How to prevent users from inserting duplicate records in the form (suppose not to change the table design)? Thanks.
Answer : How to prevent duplicate records on the form UI?
Fire 'SELECT' query before you actually insert the record. Traverse through the recordset returned by SELECT query and check if the field name already exists. If it does, show and error and if it doesn't call INSERT query.
Random Solutions
Turn On Shortcut keys selectively to export report.
Should I use SqlDataSource or SqlConnection (which is better)
How to make a PC a thin client?
Backing up SharePoint Services 3.0
running a batch file before compilation
Getting Datagrid's DropDownList value in JavaScript
Brownian Motion Charted in VBA
Is there a way to enable remote registry service on my clinets using group policy?
Auto Fill based on 2nd Column
In-place upgrade of Hyper-V Server 2k8 R2 to Full Server 2k8 w/Hyper-v role