Hi All !
I have a form that displays multiple rows of records ..each rows has a
checkbox...what i want is when user select checkboxes in many rows the
value of that checkboxes(either selected or not selcted )should be update
to the database. Kind of multiple row updates in database..?
How to write a batch updates query..?
<%@ Language=VBScript %>
<%
if(Session("username") <> "UserOK") then
Response.Redirect "login.asp"
end if
%>
<%
Dim ObjConn
Set ObjConn = Server.CreateObject("ADODB.connection")
ObjConn.Open("DSN=bdntte.time; UID= ; PWD=SHJ11")
Dim rs
set rs = Server.CreateObject("ADODB.Recordset")
Dim strSQL
strSQL = "SELECT * FROM networktime WHERE NeedFU = " & TRUE & " AND CompFU
<> " & TRUE & " "
strSQL = strSQL & "Order by Date DESC"
rs.Open strSQL,ObjConn,1,3
'Response.Write(strSQL)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body bgcolor="#FFFACD">
<form method="POST" action= followup.asp>
<table border="0" cellpadding="0" width="461" cellspacing="0">
<tr>
<td width="93"><b><font face="Arial" size="2"><a
href="http://168.143.132.196/timesheet.asp">Timesheet</a></font></b></td>
<td width="106"><b><font face="Arial" size="2"><a
href="http://168.143.132.196/customertable.asp">Customers</a></font></b></t
d>
<td width="159"><b><font face="Arial" size="2"><a
href="http://168.143.132.196/timesheetqry.asp">Review Past
Billing</a></font></b></td>
<td width="85"><b><font face="Arial" size="2"><a
href="http://168.143.132.196/follow.asp">Follow Up</a></font></b></td>
</tr>
</table>
<p>
</p>
<table border="1" cellpadding="0" width="689" bordercolor="#000000"
cellspacing="1">
<tr>
<td width="98"><b><font face="Arial" size="2">Date</font></b></td>
<td width="158"><b><font face="Arial" size="2">Client</font></b></td>
<td width="83"><font face="Arial" size="2"><b>Engineer</b></font></td>
<td width="185"><font face="Arial" size="2"><b>Follow Up
Details</b></font></td>
<td width="109"><font face="Arial" size="1"><b>Completed <br>
Follow Up</b></font></td>
</tr>
<% dim iCount
iCount = 0
%>
<% while not rs.EOF %>
<tr>
<td width="98"><a href="http://168.143.132.196/edittimesheet.asp?ID=<%
= rs("ID") %>"><%= rs("Date")%></a></td>
<td width="158"><%= rs("Customer") %></td>
<td width="83"><%= rs("Engineer")%></td>
<td width="185"> <textarea rows="3" name="ServicePerformed"
cols="45"><%= rs("FollowUpDetail")%></textarea></td>
<td width="109"><input type="checkbox" name="<%=iCount%>.CompFU" value
="on" <% if rs("CompFU") = "True" Then %>CHECKED <% End IF %> > </td>
<td width="90"><input type = hidden name = "ID" value = "<%=iCount%>.<%
= rs("ID")%>"></td>
</tr>
<% rs.MoveNext
iCount = iCount + 1
wend
%>
</table>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"><input type="hidden" value="<%=iCount-1%>"
name="count"></p>
</form>
</body>
</html>
<%
rs.Close
Set rs = Nothing
ObjConn.Close
Set ObjConn = Nothing
%>