disputeSQL = "Select D.ID, IIF(ISNULL(M.dispute_id),'','CHECKED') AS CHK,
D.U_Disputes " _
& " FROM disputes AS D LEFT JOIN mydisputes AS M " _
& " ON ( D.id = M.dispute_id AND M.dat_id = " & dat_id & ") " _
& " ORDER BY D.u_disputes"
Set RS = objconn.Execute(SQL)
count = 0
CONST CBS_PER_LINE = 2 ' if you have room, make it 3 checkboxes per line
Do Until RS.EOF
%>
<INPUT TYPE="CHECKBOX" Name="disputes" VALUE="<%=RS("id")%>" <%=RS("chk")%>
> <%=RS("U_Disputes")%>
<%
x = x + 1
If x MOD CBS_PER_LINE = 0 Then .Write "<br/>"
RS.MoveNext
Loop
end if
end with
end function
RS.close
set RS = nothing
objconn.close
set objconn = nothing
set disputeSQL =nothing
set updateDataSQL = nothing
set deleteSQL = nothing
set updateDisputesSQL = nothing
set SQL = nothing
set CBS_PER_LINE = nothing
set dat_id = nothing
set new_name = nothing
set new_desc = nothing
set new_disputes = nothing
That didn't format very well.
Exactly which line is 69?
You probably forgot an End-something somewhere.
__________________
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
If FormSubmit <> "" Then
With response
If dat_id = "" Then
.Write "<body onLoad='error0()>" & vbcrlf
End If
If Not IsNumeric(dat_id) Then
.Write "<body onLoad='error1()>" & vbcrlf
End If
updateDataSQL = "UPDATE datas SET dat_name = '" & new_name & "'," _
& " dat_description = '" & new_desc & "'" _
& " WHERE dat_id = " & dat_id
objconn.Execute updateDataSQL
deleteSQL = "DELETE FROM mydisputes WHERE dat_id = " & dat_id
.Write "<HR>DEBUG deleteSQL: " & deleteSQL & "<HR>"
objconn.Execute deleteSQL ' DO IT
updateDisputesSQL = "INSERT INTO mydisputes (dat_id, dispute_id) " _
& " SELECT " & dat_id & ", id FROM disputes " _
& " WHERE id IN (" & new_disputes & ")"
.Write "<HR>DEBUG updateDisputesSQL: " & updateDisputesSQL & "<HR>"
objconn.Execute updateDisputesSQL ' DO IT
End If << == here is the problem, now that I see formattting.
Got an End If with no If!!
If that was supposed to be there, you had to put End With first. Nesting must be done properly.
__________________
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Well, it's an unterminated string.
Terminate it.
(hint: that line isn't like your other lines...it's missing something...)
You have to help yourself a LITTLE.
__________________
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
(did I miss something...I HAVE been a bit on the slow side today...?)
__________________
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/
Oh, okay.
I thought...well...nevermind what I was thinking. It's been a rough day.
Please, someone help me. I need chocolate. Or something.
__________________
If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
Bored? Visit http://www.kaelisspace.com/