Quote:
quote:Originally posted by Imar
Is one running on the server and one on the client? Can you post the code for the button that triggers the action?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
here is the button:
<input type="submit" name="btnAction" value="Delete" onclick="return before_delete();">
Function deleteTaskOrder()
' Local Recordset
dim rsLocalDel
' Delete Contract
Set rsLocalDel = server.CreateObject("adodb.recordset")
SQL = "Select * from tblTasks where agreement_no = '" & strAgreementNum & "' and task_order = '" & strTaskNum & "'"
Response.Write "We are deleting " & sql
' Run Query
rsLocalDel.open SQL, cn, 0, 3
' Check to see if task exists
if rsLocalDel.recordcount = 1 Then
'if not rsLocalDel.eof Then
' deletes record
With rsLocalDel
.delete
'.movenext
.close
End With
Else
' Deleting more than one record, display error message
Response.Write " Error: Attempting to delete " & rsLocalDel.recordcount &" records is not allowed. Please contact system administrator."
'Response.Write "Error: Estimate Number " & strTaskNum & " no longer exists!"
End If
set rsLocalDel = nothing
End Function
' --- PROCESSING LOGIC STARTS BELOW
........
' Process the Add/Update/Delete/Search functions
btnAction = request("btnAction")
select case btnAction
case "Add"
' Add the task order
if strAgreementNum <> "" and strTaskNum <> "" then ' Make sure user entered a value
addTaskOrder()
' After the add, perform a search to reload agreement no :)
searchAgreementNo
end if
case "Update"
' Update the task order
if strAgreementNum <> "" then
updateTaskOrder()
' After the update, perform a search to reload agreement no :)
searchAgreementNo
end if
case "Delete"
'Delete the task order
if strTaskNum <> "" then
deleteTaskOrder()
' After the delete, perform a search to reload agreement no :)
'searchAgreementNo
end if
case ""
' Process the search
if strAgreementNum <> "" then
searchAgreementNo
end if
end select
slypunk