DELETE FROM table_name
WHERE column_name = some_value
Your Welcome
if you need any more help can you give up a little more detailed explanation on what you are doing and what the situation is?
____________________________________________________ get the best answer to your questions by asking the best questions "General FAQ" faq333-2924
if (cstr(requestPatientID) = "" then
Response.write("Request ID is required. "
else
sqlString = "select * from Patients, Examinations where Patients.PatientID = Examinations.ID and PatientID = " & requestPatientID
Set rsPatientInfo = myConnection.Execute(sqlString)
If(rsPatientInfo.BOF) AND (rsPatientInfo.EOF) then
Response.write("Sorry, but Patient's ID " & requestPatientID _
& " was not found."
ELSE
%>
first task is to find out what submit button was pressed.
javascript on the client would be the process to do this
what you want to do is have a hidden form field in the form. give this form field a name pertaining to the submit types.
eg:<input type="hidden" name="submitValue">
then you change that value on the submit event with a return in the submits via onClick="return function()">
the function would look like this with a call of
onClick="return whichButton(this.name)"
function whichButton(subName) {
if(subName=="delete" {
return document.formname.submitValue.value="delete";
}
now you place the page in a if statement. this way you can check the page for the event occuring on the click of one of the submits
eg:
<%
If Request.Form("submitValue" = "delete" Then run a sql delete for the value
ElseIf Request.Form("submitValue" = "submitted" Then run that condition here
Else output the HTML page as you have it
don't forget at the bottom of the page to do
<% End If %>
as for the actual deletion of the values. you can add the values as you have them to hidden form fields according to the values outputed as is not in the table. pass this value jsut as you pass the value of the submit event of which button was clicked.
____________________________________________________ get the best answer to your questions by asking the best questions "General FAQ" faq333-2924
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.