Forums

This topic is locked

Update multiple records

Posted 07 Apr 2002 23:08:05
1
has voted
07 Apr 2002 23:08:05 Suat donangil posted:
i have a page that updates records via check boxes but i can only update one field at a time. I want to update multiple records by selecting more checkboxes. How can i do this and when no checkbox is not selected i want to display a text e.g Select at least one record. Is it also possible to delete multiple records with a different submit button within a form(one form 2 buttons, one button will delete records & the other one will update the records.


<%
if(Request.form("checkbox"<> "" then Command1__varlink = Request.form("checkbox"
%>
<%
set Command1 = Server.CreateObject("ADODB.Command"
Command1.ActiveConnection = MM_directory_STRING
Command1.CommandText = "UPDATE dir_links SET Approved ='Yes' WHERE Link_ID = " + Replace(Command1__varlink, "'", "''" + ""
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()
%>

Reply to this topic