473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Want to Use Custom Validator To Check for Duplicate Record

We have 3 fields on our web form that makeup what could be a duplicate entry.
We would like to look at these three fields that the user enters and check
in the database to see the information in all three fields matches
information in the database. Can you do this in a custom validator?
Nov 19 '05 #1
9 3926
Sure you could... Give it a whirl and let us knwo where you get the
problem/issue.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike Moore" <Mi*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
We have 3 fields on our web form that makeup what could be a duplicate
entry.
We would like to look at these three fields that the user enters and check
in the database to see the information in all three fields matches
information in the database. Can you do this in a custom validator?

Nov 19 '05 #2
How? We would like to have the message also displayed in the summary
validation.

"Curt_C [MVP]" wrote:
Sure you could... Give it a whirl and let us knwo where you get the
problem/issue.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Mike Moore" <Mi*******@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
We have 3 fields on our web form that makeup what could be a duplicate
entry.
We would like to look at these three fields that the user enters and check
in the database to see the information in all three fields matches
information in the database. Can you do this in a custom validator?


Nov 19 '05 #3
"=?Utf-8?B?TWlrZSBNb29yZQ==?=" <Mi*******@discussions.microsoft.com> wrote
in news:9A**********************************@microsof t.com:
How? We would like to have the message also displayed in the summary
validation.


Search the database. If there are multiple records, set Args.Isvalid =
False.
You can do ANYTHING in a custom validator. It basically executes any code
you place in there when a validation is called. Technically it doesn't even
need to do validation... you could use it for logging or whatever.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #4
are you suggesting to have one custom validation or to validate on each of
the three fields?

We would like to have a red askerisks appear beside the three fields if a
duplicate record is found in the database. We would also like to have the
duplicate message displayed in the summary validation control.

"Lucas Tam" wrote:
"=?Utf-8?B?TWlrZSBNb29yZQ==?=" <Mi*******@discussions.microsoft.com> wrote
in news:9A**********************************@microsof t.com:
How? We would like to have the message also displayed in the summary
validation.


Search the database. If there are multiple records, set Args.Isvalid =
False.
You can do ANYTHING in a custom validator. It basically executes any code
you place in there when a validation is called. Technically it doesn't even
need to do validation... you could use it for logging or whatever.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #5
"=?Utf-8?B?TWlrZSBNb29yZQ==?=" <Mi*******@discussions.microsoft.com>
wrote in news:B3**********************************@microsof t.com:
are you suggesting to have one custom validation or to validate on
each of the three fields?

We would like to have a red askerisks appear beside the three fields
if a duplicate record is found in the database. We would also like to
have the duplicate message displayed in the summary validation
control.

Is each text field a separate validation? If so, I would use 3 validators.
Two reasons: 1. Errors will be displayed in the validation summary. 2. The
askteriks will be displayed automatically.
You could use 1 validator - in this case just put a label beside the other
fields and set the text to *. However, placing error text into the
Validation Summary maybe more difficult.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #6
Another thing to mention is that it works when we have the summary validation
property set to showmessagebox = false, but we need it to be set to true. It
might be the way we are doing the validation. we have custom validation
controls that are set to false until are code runs and then sets them to
true, but the message box doesn't get displayed.

any suggestions would be helpful?

"Mike Moore" wrote:
We have 3 fields on our web form that makeup what could be a duplicate entry.
We would like to look at these three fields that the user enters and check
in the database to see the information in all three fields matches
information in the database. Can you do this in a custom validator?

Nov 19 '05 #7
thanks for your suggestions.....

"Lucas Tam" wrote:
"=?Utf-8?B?TWlrZSBNb29yZQ==?=" <Mi*******@discussions.microsoft.com>
wrote in news:B3**********************************@microsof t.com:
are you suggesting to have one custom validation or to validate on
each of the three fields?

We would like to have a red askerisks appear beside the three fields
if a duplicate record is found in the database. We would also like to
have the duplicate message displayed in the summary validation
control.

Is each text field a separate validation? If so, I would use 3 validators.
Two reasons: 1. Errors will be displayed in the validation summary. 2. The
askteriks will be displayed automatically.
You could use 1 validator - in this case just put a label beside the other
fields and set the text to *. However, placing error text into the
Validation Summary maybe more difficult.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #8
We have it working now, but the only problem is that the message box doesn't
pop-up. Would there be any reason why this is happening?

"Lucas Tam" wrote:
"=?Utf-8?B?TWlrZSBNb29yZQ==?=" <Mi*******@discussions.microsoft.com>
wrote in news:B3**********************************@microsof t.com:
are you suggesting to have one custom validation or to validate on
each of the three fields?

We would like to have a red askerisks appear beside the three fields
if a duplicate record is found in the database. We would also like to
have the duplicate message displayed in the summary validation
control.

Is each text field a separate validation? If so, I would use 3 validators.
Two reasons: 1. Errors will be displayed in the validation summary. 2. The
askteriks will be displayed automatically.
You could use 1 validator - in this case just put a label beside the other
fields and set the text to *. However, placing error text into the
Validation Summary maybe more difficult.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 19 '05 #9
"=?Utf-8?B?TWlrZSBNb29yZQ==?=" <Mi*******@discussions.microsoft.com>
wrote in news:62**********************************@microsof t.com:
We have it working now, but the only problem is that the message box
doesn't pop-up. Would there be any reason why this is happening?


If you have the new IE service pack loaded, it blocks pop-ups.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Spartanicus | last post by:
The document at http://homepage.ntlworld.com/spartanicus/custom_dtd.htm uses a custom DTD, the w3c validator validates it but with this warning: "Unknown Parse Mode! The MIME Media Type...
9
by: Alex Shirley | last post by:
Hi there I’m simply trying to check for a blank or empty value in a textbox on my webform. In this instance I do not want to use a requiredfieldvalidator, I want to use a customvalidator (as I...
0
by: gjtired | last post by:
Hi, I created a custom validator to check that a user entered date is a valid date. It does display an error message when I enter an invalid date. When I correct the date I can't save the record...
8
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on...
8
by: g_man | last post by:
I am trying trap Runtime error 3022 (duplicates) in the click event of a command button that closes the form. I have code in the Form_Error event that does a good job of providing a more meaningful...
3
by: Rich Squid | last post by:
Hello Here's my basic problem: On my asp.net form page I have a DetailsView (default mode=edit) bound to a AccessDataSource control. Users can successfuly update a databound template field,...
2
by: tinariver | last post by:
I am using the onServerValidate of CutomValidator. I have got the Calender control and a text control. When user pick the date from calender conrol and value goes in the text box. Now I have to...
2
by: Ranma13 | last post by:
Hello, I have a duplicate record check written in VB for a check in/check out database. Here's the pseudocode, written for the BeforeUpdate property on the form: If DCount(search for records with...
1
by: Steveaux | last post by:
Hi, I'm new to ASP.Net, so this may be something simple that I forgot. I have a form where a person can create a login. I'm doing the processing on this myself. The form has a plethora of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.