ADODB.Command
[
2008/03/17 14:20 | by Else ]
2008/03/17 14:20 | by Else ]
Set rslist_cmd = Server.CreateObject ("ADODB.Command")
<%
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("act")) = "del") Then
' execute the delete
Set MM_delCmd = Server.CreateObject ("ADODB.Command")
MM_delCmd.ActiveConnection = MM_conn_STRING
MM_delCmd.CommandText = "DELETE FROM dbo.jpcusertable WHERE id = ?"
MM_delCmd.Parameters.Append MM_delCmd.CreateParameter("param1", 5, 1, -1, Request.QueryString("id")) ' adDouble
MM_delCmd.Execute
MM_delCmd.ActiveConnection.Close
' append the query string to the redirect URL
Response.Redirect("client.asp")
End If
%>
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("act")) = "del") Then
' execute the delete
Set MM_delCmd = Server.CreateObject ("ADODB.Command")
MM_delCmd.ActiveConnection = MM_conn_STRING
MM_delCmd.CommandText = "DELETE FROM dbo.jpcusertable WHERE id = ?"
MM_delCmd.Parameters.Append MM_delCmd.CreateParameter("param1", 5, 1, -1, Request.QueryString("id")) ' adDouble
MM_delCmd.Execute
MM_delCmd.ActiveConnection.Close
' append the query string to the redirect URL
Response.Redirect("client.asp")
End If
%>




