strcode = "'" & replace(TRIM(Request.QueryString("code")),"'","''") & "'"
the replace is needed for handling the case when code contains an ' in which case that need to be doubled.
Assuming that the querysting contains the value O'brien then the variable strcode will contain the value
'O''brien'
and putting that into the delete statement would yield
con8.Execute "DELETE FROM equipment WHERE code = 'O''brien'",,128
VB-script does not recognize variables in strings (how could it?) so you must use an explicit concatenation.
What happened in your code is that you tried to delete records where the column code equals the string strcode and not the value in the field.
A delete statement does not return any rows and thus there is no need for a recordset. However, ADO will by default create an empty and closed recordset for all statements and the 128 will stop ADO from doing that.