kescott
Posts: 49
|
Posted: 10/22/2008, 1:35 PM |
|
I have had some success, but not the answer I need yet.
I'm trying to validate two values in a database before a value is allowed to submit to the database. I have an employee entry form. I need to make sure that an emplyee's last name and first name is not in the database.
For example:
-------------------------|
Employees-------------|
-------------------------|
F_Name---|L_Name---|
-------------------------|
Bob_____|Jones_____|
Mary____|Hearts____|
-------------------------|
This is what I have so far any ideas...
if(L_Name!=null&&!provider.CheckUnique("L_Name",this)&&F_Name!=null&&!provider.CheckUnique("F_Name",this))
errors.Add("L_Name",String.Format(Resources.strings.CCS_UniqueValue,"L_Name"));
errors.Add("F_Name",String.Format(Resources.strings.CCS_UniqueValue,"F_Name"));
When I deliberatly enter a name that I know that exist in the database like "Bob Jones", an error explains that "Bob Jones" exist in the database.
However, if I enter "Bob" and attempt to submit, then explains that "Bob" exists in the database
or
if I enter "Jones" and attempt to submit, then explains that "Jones" exists in the database
_________________
B.S. of Computer Science
Class of 2005
Norfolk State University
Norfolk, VA
http://www.nsu.edu
|