%@ LCID = 5129 %> <% Response.expires = 0 Response.expiresabsolute = Now() - 1 Response.addHeader "pragma", "no-cache" Response.addHeader "cache-control", "private" Response.CacheControl = "no-cache" %> <% ewCurSec = 0 ' Initialise ' User levels Const ewAllowAdd = 1 Const ewAllowDelete = 2 Const ewAllowEdit = 4 Const ewAllowView = 8 Const ewAllowList = 8 Const ewAllowReport = 8 Const ewAllowSearch = 8 Const ewAllowAdmin = 16 %> <% ' Initialize common variables x_csn = Null x_type = Null x_status = Null x_issue = Null x_card_size = Null x_expiry_date = Null x_issued_date = Null x_issued_at = Null x_issuer = Null x_reissued = Null x_hot = Null x_id = Null %> <% Response.Buffer = True ' Load Key Parameters sKey = Request.querystring("key") If sKey = "" Or IsNull(sKey) Then sKey = Request.Form("key_d") End If arRecKey = Split(sKey&"", ",") ' Single delete record If sKey = "" Or IsNull(sKey) Then Response.Redirect "card_datalist.asp" sDbWhere = sDbWhere & "[csn]='" & Trim(sKey) & "'" ' Get action sAction = Request.Form("a_delete") If sAction = "" Or IsNull(sAction) Then sAction = "I" ' Display with input box End If ' Open connection to the database Set conn = Server.CreateObject("ADODB.Connection") conn.Open xDb_Conn_Str Select Case sAction Case "I": ' Display If LoadRecordCount(sDbWhere) <= 0 Then conn.Close ' Close Connection Set conn = Nothing Response.Clear Response.Redirect "card_datalist.asp" End If Case "D": ' Delete If DeleteData(sDbWhere) Then Session("ewmsg") = "Delete Successful For Key = " & sKey conn.Close ' Close Connection Set conn = Nothing Response.Clear Response.Redirect "card_datalist.asp" End If End Select %>
Delete from TABLE: card data
Back to List