Delete user
I am trying to create a way to delete a user from the database, i have adapted some
code from a book, but i am getting an error message;
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/new/RemoveUser.asp, line 31
line 31 is
objRS.Find "ID=" & varID
the code below is the one i am using (there are 3 files, if required, i will post them up)
Thanks in advance
I am trying to create a way to delete a user from the database, i have adapted some
code from a book, but i am getting an error message;
Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/new/RemoveUser.asp, line 31
line 31 is
objRS.Find "ID=" & varID
the code below is the one i am using (there are 3 files, if required, i will post them up)
Thanks in advance
Code:
<%
Option Explicit
Dim StrConnect
%>
<!-- #INCLUDE FILE="ProjectConnection.asp" -->
<HTML>
<HEAD>
<TITLE>
User Deleted
</TITLE>
</HEAD>
<BODY>
<%
Dim varConfirm
varConfirm = Request.Form("Confirm")
If varConfirm="no" Then
Response.Redirect "AdminRemoveUser.asp"
End If
Dim varID
varID = Request.Form("ID")
Dim objRS
Set objRS=Server.CreateObject("ADODB.Recordset")
objRS.Open "RegisteredUsers", strConnect, 3,3
objRS.Find "ID=" & varID
If objRS.EOF Then
Response.Write "That username does not exist"
Else
objRS.Delete adAffectCurrent
End If
objRS.Close
Set objRS = Nothing
%>
</BODY>
</HTML>