Actually I'm doing a project to maintain the company info, here i wanted to write a code to check whether the company id already exists or not. that is if the id 123 is already present in the access database then it shuld show the msg that it already exist. Please can any one help me in this.
Neethaa
0
Newbie Poster
Recommended Answers
Jump to PostDo a query to select the record with that ID. If it returns a record then you know that it exists.
Dim myID As String = "123" query = "SELECT * FROM myTable WHERE company_ID = '" & myID & "'"
or even
All 3 Replies
khair.ullah
-2
Junior Poster in Training
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Neethaa
0
Newbie 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.