Change your code so that:
Confirm message is populated when you click on a link or submit a form.
If the user chooses NO, just return false to prevent the link to be followed or form to be submited.
The href of the link/action of the form should point to an asp-page that will execute the SQL query.
HTH
Zlatin Zlatev,
MCSD (VS6)Make solutions, not programs!