dcsimg
how to avoid operation like insert to database on refreshing page
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   lokesh_madanbhavi
Posted On:   Monday, April 24, 2006 03:54 AM

hai am facing a problem of inserting same values into table, when i press refresh button..


i have one page from where when i click submit button it will insert form values(blog details) into database and then request is forwarded to another jsp page showing list of blogs entered. But when i press F5 button or refresh page it will insert blog entered once again to database hence creating duplicate blogs.. how to overcome this problem?

Re: how to avoid operation like insert to database on refreshing page

Posted By:   Anonymous  
Posted On:   Wednesday, April 26, 2006 09:09 AM

Not entirely sure, but can you clear the form used, after saving and before the forwarding? This way, there is nothing to send.



Alternatively, the code that updates, can it do a select first, to see if it already exists, and only inserting the new entry if it is a new entry?

About | Sitemap | Contact