record checking (if a record already exists)

Joined
Jan 27, 2005
Messages
9
Programming Experience
1-3
hi. i have a part of my form that asks for the lastname, and the firstname of a person. I have to make the name to be unique so that if for example "Perez, Mark" has been entered as input for a user's record, it will check if the name "Perez, Mark" is already stored on the database, if so then the user will be notified that the particular name is already in the database. And it will just return the ID of that record (in my example, "Perez, Mark" is the name.). I'm just wondering how could i possibly do that? Well, in my case i have the lastname, firstname on my table named Members.
 

cjaymcmeans

Well-known member
Joined
Jan 12, 2005
Messages
85
Programming Experience
3-5
what are you using?

are you using datasets and datatables?

have you tried making a query?

select * from members where firstname=text1 and lastname=text2...

i need more details..
 

mzim

Well-known member
Joined
Jun 3, 2004
Messages
187
Location
Other side of the rock
Programming Experience
1-3
crazy_beautiful said:
hi. i have a part of my form that asks for the lastname, and the firstname of a person. I have to make the name to be unique so that if for example "Perez, Mark" has been entered as input for a user's record, it will check if the name "Perez, Mark" is already stored on the database, if so then the user will be notified that the particular name is already in the database. And it will just return the ID of that record (in my example, "Perez, Mark" is the name.). I'm just wondering how could i possibly do that? Well, in my case i have the lastname, firstname on my table named Members.


you want the lastname and firstname unique?
quite weird though.
my solution or way of doing that is...load the names in your datatable and loop through your datatable to check whether the names entered are unique.
 
Top Bottom