How to use a button to delete the record from database table using asp

hello, I want to use one button to remove the relative column in the database table.

I have code in asp in the attachment. Could any one take a look at it and help me please.

Because I got the sytex error with the sub function. So how to modify this code so that when I click the button, it runs the function and delete that specific column in the table. Thanks in advance!!

What I do is call all records, hyperlink them to there ID field in the database. When the user clicks a button it is linked to an asp page like this:


<a href = "remove_record.asp?ID=<% Response.Write(rs1("ID"))%>">Remove</a> 

remove_record.asp


<% @ Language = "VBScript" %>

<% Dim conn %>

<%
Set conn = server.createobject("ADODB.Connection")

Set CmdDeleteRecord = Server.CreateObject("ADODB.Recordset")

conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("yourDB.mdb")

ID = Request.QueryString ("ID")
sql = "DELETE FROM main WHERE (ID = " & ID & ")"

CmdDeleteRecord.Open SQL, conn

%>