sntax error or acces violation
Please help me. I am trying to delete the data in data base
and at the same time delete three txt boxes in an asp page.
When the user hits delete function. The code I have written
gives me an error. Please help me with this error.
if Request.Form("txtMode")="R" then
objHistoryRate.Requery
delFrom = Request.Form("txtdelFrom")
delTo = Request.Form("txtdelTo")
delRate = Request.Form("txtdelRate")
strDel = "delete from tblCustRate"
if resType ="E" then
strDel = strDel & " where iEmpID =" & iEmpID
else
strDel = strDel & " where iSubcontID =" & iSubcontID
end if
strDel = strDel & " and iTaskiD = " & iTaskID&_
if delFrom ="" then
strDel = strDel + " and dtRateFrom is null"
else
strDel = strDel + " and dtRateFrom='" &delFrom &"'"
end if
if delTo="" then
strDel = strDel + " and dtRateTo is null"
else
strDel = strDel + " and dtRateTo='" &delTo &"'"
end if
if delRate="" then
strDel = strDel + " and decHourlyRate is null"
else
strDel = strDel + " and decHourlyRate=" &delRate
end if
end if
" and iProjDetiD = " & iProjDetID
set objConn1=Server.CreateObject("ADODB.Connection")
objConn1.ConnectionString = Application("HR2000Conn_ConnectionString")
objConn1.Open
set objCommand=Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection=objConn1
objCommand.CommandType=4
objCommand.CommandText=strDel
'set objHistoryRate = objCmd.Execute
'Response.Write strDel
objCommand.Execute
|