• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

What error happen here?

Nismo83

OSNN AZN Addict
#1
<%

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?
 

X-Istence

*
Political User
#2
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.
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,960
Messages
673,237
Members
89,011
Latest member
grovo_test