You wrote:
" Var1=request("delfile")
SQL="delete from updown where ID IN ('"&Var1&"')"
cn.execute SQL "
This code won't work. reread my orignal response. What you have makes a query
something like:
delete from updown where ID IN ('3,4,5,8')
Depending on if the values are text or numerical, it would be either
delete from updown where ID IN ('three','four','six','eight') OR
delete from updown where ID IN (3,4,5,8)
Jegatha <[EMAIL PROTECTED]> wrote:
sorry, In my code i have the field var1 to request.form("delfile") only, i have
mistekenly posted that code, My code is
<%
Var1=request("delfile")
SQL="delete from updown where ID IN ('"&Var1&"')"
cn.execute SQL
while not rs.eof
a=rs(0)
%>
<tr>
<form name=frm method="post" action="recordsview.asp">
<td width="10%" height="39" bgcolor="#B8B872"
bordercolor="#B8B872"> </td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF">
<input type="checkbox" name="delfile" value=<%=a%>></font></td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF"> <%=rs(0)%> </font></td>
<input type=hidden name=hid1 value=<%=rs(0)%>>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF"> <%=rs(1)%> </font></td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF"> <%=rs(2)%> </font></td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF"> <%=rs(3)%> </font></td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF"> <%=rs(4)%> </font></td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font color="#FFFFFF"> <%=rs(6)%> </font></td>
<td width="10%" height="39" bgcolor="#808000" bordercolor="#B8B872">
<font face="Palatino Linotype" size="2" color="#FFFFFF">
</font><font face="Palatino Linotype" size="2"
color="#FFFFFF"> </font></td>
<td width="10%" height="39" bgcolor="#B8B872"
bordercolor="#B8B872"> </td>
</tr>
<%
rs.movenext
wend
%>
Dan Powderhill <[EMAIL PROTECTED]> wrote:
hid1 is the name of the hidden field you have in your HTML, not the
checkbox - shouldn't you be setting the value of Var1 to
request.form("delfile")?
Also you appear to be missing a closing angle-bracket on your checkbox
tag.
Dan
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Jegatha
Sent: 27 October 2005 09:41
To: [email protected]
Subject: RE: [AspClassicAnyQuestionIsOk] Multiple records deletion
Thank u Dan,
ya it written all the check box values(including not selected) with
comma.
i have post this page to the same page is there any problem with that ?
this is my code:
<%
Var1=request("hid1")
SQL="delete from updown where ID IN ('"&Var1&"')"
cn.execute SQL
response.write Var1
while not rs.eof
a=rs(0)
%>
<tr>
<form name=frm method="post" action="recordsview.asp">
<td> </td>
<td><input type="checkbox" name="delfile" value=<%=a%></td>
<td><%=rs(0)%></td>
<input type=hidden name=hid1 value=<%=rs(0)%>>
<td><%=rs(1)%></td>
<td><%=rs(2)%></td>
<td><%=rs(3)%></td>
<td><%=rs(4)%></td>
<td><%=rs(6)%></td>
</tr>
<%
rs.movenext
wend
%>
Thanks
jegatha
---------------------------------
Enjoy this Diwali with Y! India Click here
[Non-text portions of this message have been removed]
________________________________
YAHOO! GROUPS LINKS
* Visit your group "AspClassicAnyQuestionIsOk
<http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
subscribe>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
________________________________
[Non-text portions of this message have been removed]
SPONSORED LINKS
Basic programming language Computer programming languages Programming languages
Java programming language
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "AspClassicAnyQuestionIsOk" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Enjoy this Diwali with Y! India Click here
[Non-text portions of this message have been removed]
SPONSORED LINKS
Basic programming language Computer programming languages Programming languages
Java programming language
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "AspClassicAnyQuestionIsOk" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/