how to prevent duplicate file in Access db?
-
hi how do i make sure that user cannot create New Customer Profile if there's already one in Access database? thanks
hi there, That depends on which field(property) need to be checked for duplicate. Assume that each customer has his id and the id must be unique in whole system. So that before creating a new customer, ur application will validate the id if it's already existed or not. << >>
-
hi there, That depends on which field(property) need to be checked for duplicate. Assume that each customer has his id and the id must be unique in whole system. So that before creating a new customer, ur application will validate the id if it's already existed or not. << >>
yes, yes.. that's what i want to do (to check if that id is already in my database) how do i do that? also, how to check for repeated data just based on three particular fields though i've other fields in that row... that means if 1 or 2 of the particular fields are repeated data, it's not considered as duplicates. but if all three of the particular fields have repeated data, it IS duplicate and how can i prevent that?? lastly, how to check for repeated data if based on all fields on a row?? meaning, all fields are the same then it's considered duplicate. thank you for your time! =)
-
yes, yes.. that's what i want to do (to check if that id is already in my database) how do i do that? also, how to check for repeated data just based on three particular fields though i've other fields in that row... that means if 1 or 2 of the particular fields are repeated data, it's not considered as duplicates. but if all three of the particular fields have repeated data, it IS duplicate and how can i prevent that?? lastly, how to check for repeated data if based on all fields on a row?? meaning, all fields are the same then it's considered duplicate. thank you for your time! =)
hi there, ur question can be devided into 3 parts: nidhelp wrote: check if that id is already in my database => to validate: just execute "select id from customer where id= m_sID". If the returned result is not NULL, that means it's duplicated nidhelp wrote: if all three of the particular fields have repeated data => the similar thing u need to do: "select id from customer where field1 = field1Val and field2 = field2Val and field3=field3Val" nidhelp wrote: if based on all fields on a row =>similar to the second one with all fields need to be verified in WHERE clause Happy programming << >>