Saturday, 15 June 2013

java - How do I check if the value already exists in the database? -


I create client-server app in Java On the server I have Microsoft Access Database (SQL), and on my client's Have a close geometry form. I have a communication between my client and server and this is not a problem. My form has a fixed text field (let's call it txtField). I need to put some data into my database through the form. But before that, it should be checked whether the value typed in the text already exists in the database. How do I do this, and to write this code, what do I think in the form? Thank you

I need to insert some data into my database through the form. First, it should be checked whether the value typed in the text already exists in the database.

No. If it is not already there, then you need to put it into the database, putting the right way to do it and trying to catch the failure. Otherwise, you are creating a time-window problem between your investigation and your insert, during which another customer can insert.

No comments:

Post a Comment