Hi All,

I want to know how to avoid inserting multiple records. Below is my case;

(1) I have a jsp page - when a timer for a particular product reaches 3 mins, i am getting that particular productid and sending the productid through ajax

(2) in the ajax script, i am getting the product id and redirecting to a jsp page

(3) in that jsp page, i am inserting a record to a table for that particular productid. Everything works fine, but many records are inserting, i just want to insert only one record.

It would be great if any one can help on how to stop or avoid inserting multiple records.

Thanks,
Pradeep

Check whether the productid is already inserted in the jsp page and if it is don't add another record and if it isn't insert it?

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.