hello please help me on this i don't know how to trap the duplicate id_no..example if i have already added this id_no H-1010..then if i input again it should prompt that id_no is already exist on your database..please help me on this..hoping for your positive responds ..thanks in advance
jemz -1 Master Poster
Recommended Answers
Jump to Postsidnei, good post but if you reread jemz post you will see that they are entering H-1010 for the primary key, meaning that the primary key is a text field. So jemz I would suggest that you use sidnei's 1st suggestion...
strSQL = "SELECT COUNT(fieldname) AS THECOUNT …
Jump to PostYou can try this.
Jump to Postif you have no question about this topic then please mark it solve.
Jump to Posthi Jemz
simple way is to add id_no as the primary key or unique key constraint in the database.
All 15 Replies
sidnei 12 Junior Poster in Training
vb5prgrmr 143 Posting Virtuoso
abu taher 34 Practically a Posting Shark
jemz -1 Master Poster
abu taher 34 Practically a Posting Shark
jemz -1 Master Poster
jemz -1 Master Poster
kinwang2009 7 Posting Whiz in Training
sidnei 12 Junior Poster in Training
sidnei 12 Junior Poster in Training
vb5prgrmr 143 Posting Virtuoso
phpbeginners 1 Posting Whiz in Training
jemz -1 Master Poster
zigpy_siva 0 Newbie Poster
jemz -1 Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.