when I try to delete a record i get the error message
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
when i try to insert or amend i don't get any error message the update to the table is not done!!
here is my asp page, grateful for any input
steve
<%Response.Expires = 0%>
<html>
<head>
<title>City Of Westminster Missed Collection Complaint Types</title>
</head>
<%
Dim ConnODBC, objDBConn, rs, strSQL, ThisServer, ThisUID, ThisPWD, ThisDB, RecCnt
set ConnODBC = Server.CreateObject("ADODB.Connection"
ThisServer = Application("SERVER"

ThisUID = Application("UID"

ThisPWD = Application("PWD"
objDBConn= "DRIVER={SQL Server};SERVER=" & ThisServer & ";UID=" & ThisUID & ";PWD=" &ThisPWD
ConnODBC.Open objDBConn
%>
<body>
<!-- #include file= "../include/adovbs.inc" -->
<!-- #include file= "../include/WireLogo.inc" -->
<H1 ALIGN="center">Environmental Health<br>
Complaint Type Maintenance - Add Complaint Type Report Code</H1>
<%
Set rs = Server.CreateObject("ADODB.Recordset"

rs.ActiveConnection = ConnODBC
if Request.Form("txtStatatus"

= "Add/Amend Complaint Report Code" then
strSQL = "SELECT COUNT(*) AS RecCnt FROM tblcomplainttypes " _
& "WHERE ComplaintTypeID = " & Request.Form("txtID"

'Response.Write strSQL & "<p>"
rs.Open strSQL, ConnODBC, adOpenStatic, adLockReadOnly, adCmdText
'response.write rs("RecCnt"
if rs("RecCnt"

= 1 then
'Update query
sqlstr = "UPDATE tblComplaintTypes " _
& "SET ComplaintType = '" & Request.Form("txtComplaintType"

_
& "', ServiceType = '" & Request.Form("txtServiceType"

_
& "', ReportFunction = " & Request.Form("cboReportCode"

_
& " WHERE ComplaintTypeID = " & Request.Form("txtID"

elseif rs("RecCnt"

= 0 then
'insert query
sqlstr = "INSERT INTO tblComplaintTypes " _
& "(ComplaintTypeID, ComplaintType, ServiceType, ReportFunction) " _
& "VALUES (" & Request.Form("txtID"

_
& ", '" & Request.Form("txtComplaintType"

_
& "', '" & Request.Form("txtServiceType"

_
& "', " & Request.Form("cboReportCode"

& "

"
end if
rs.close
else
sqlstr = "DELETE FROM tblComplaintTypes WHERE ComplaintTypeID = " & Request.Form("txtID"

end if
Response.Write sqlstr
rs.Open strSQL, ConnODBC, adOpenStatic, adLockReadOnly, adCmdText
rs.close
set rs= Nothing
set ConnODBC = Nothing
%>
</body>
</html>