What error happen here?

Nismo83

OSNN AZN Addict
Joined
13 Mar 2004
Messages
384
<%

Id3 = Request.Querystring("Id3")

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("news.mdb"))

sSQL = "SELECT * FROM messages WHERE Id3 = " & Id3

Set Message = oConn.Execute(sSQL)

Id1 = Message("Id1").Value
Id2 = Message("Id2").Value
Id3 = Message("Id3").Value

Locked = Message("Locked").Value
Password = Message("Password").Value
%>
<%
sSQL2 = "SELECT * FROM messages WHERE Id2 = " & Id2 & " ORDER BY Id3 "
Set action = oConn.Execute(sSQL2)
%>


<% Do While NOT action.EOF %>

ContentRAW = action("Content").Value
Content = emoticon(ContentRAW)

Response.Write LinkURLs(Content)%>

<% If Session("Mod") <> "" Then %>
<% If action("OriginalMessage") <> "Yes" Then %>
| <a href="Delete.asp?Id3=<%= Id3 %>" target="_new"><font color="Red">Del Message</font></a>
<% End If %><% If action("OriginalMessage") <> "No" Then %> | <a href="Delete.asp?Id2=<%= Id2 %>" target="_new"><font color="Red"><b>Del Thread</b></font></a>
<% End If %><% End If %>
><%
action.MoveNext

Loop
%>

======================
The id3 in the "delete.asp?id3" doesn't seems to loop and all of the message shown in the delete.asp?id3 have the same value. Why this is happening?
 
Its ASP.

Nuff said.

Anyways, look for stray <% %> first, and fix all those. Then check if everything is all correct, i dont know if cAsE matters, if it does check that.

Note: that using data straight from the GET line of a browser is not really smart, since any user could then kinda modify your SQL qeury.
 
i found the error already.. not those <% .. %> problem.. anyway, thanks for your comment
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back