First, delete records
Opendataconn ' Open database connection
Xxlb=rtnreplaceint (Trim (Request ("Xxlb")), 0) ' in order to receive the XXLB variable, remove the space at both ends of the variable, the outermost is a custom function, estimated with the replacement.
ID=CHANGECHR (Request ("id")) ' receives ID and converts it to a string
Ids=split (ID, ",") ' Press ID ', ' Split, and save to array IDs
For i=0 to UBound (IDs) ' Iterate through an array with a For loop
Tt=trim (IDs (i)) ' array element removes both ends of space and assigns the value to TT
Conn.execute "Delete from house where id=" &tt& "' Deletes records of ID=TT variables in a datasheet
Next ' Loop ends
Response.Redirect "house.asp?xxlb=" &xxlb& "" jumps to the House page and passes the XXLB parameter with the Get method, which is the value of the XXLB variable.
Closedataconn Close the database connection
Second, the connection database
Dim conn ' Defines a variable
Dim char_str (20) ' defines an array
Sub Opendataconn () custom process, user linked to database
Dim connstr Define Variables
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data source="
ConnStr = connstr & Server.MapPath (".. /.. /data/fyhouse_free.mdb ")" Database-driven string
' Response.Write connstr output variable connstr value
Set Conn=server.createobject ("Adodb.connection") ' Create a Connection object
Conn. Open connstr ' linked database
End Sub is the closing of the process, but it doesn't begin with the code you posted.