Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 i dont understand......
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 13 April 2001 :  23:38:54  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
i have a piece of code that used to work. im not sure what i changed when it quit working, but if i take the code and put it in a file by itself it works fine. but when i insert it into the code that is run with the rest of the site it does not work. any ideas why this could be happening? below is the code....


strSQL = "SELECT " & strMemberTablePrefix & "MEMBERS.M_BUDDIES_ONLINE "
strSQL = strSQL & "FROM " & strMemberTablePrefix & "MEMBERS "
strSQL = strSQL & "WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID='" & strDBNTUserID & "'"
set rsBuddiesOnline = my_Conn.Execute (strSQL)

if rsBuddiesOnline.eof or rsBuddiesOnline.bof then
else
strDBBuddiesOnline = rsBuddiesOnline("M_BUDDIES_ONLINE")

if isNull(strDBBuddiesOnline) or strDBBuddiesOnline = "" then

else
strDBBuddiesOnline = split(strDBBuddiesOnline, "|")
strDBBuddiesOnlineCount = 0
strSQL = "SELECT " & strMemberTablePrefix & "Active_Users.A_MEMBER_USERNAME "
strSQL = strSQL & ", " & strMemberTablePrefix & "Active_Users.A_MEMBER_ID "
strSQL = strSQL & "FROM " & strMemberTablePrefix & "Active_Users "
for i = 0 to ubound(strDBBuddiesOnline)
if strDBBuddiesOnlineCount = 0 then
strSQL = strSQL & "WHERE " & strMemberTablePrefix & "Active_Users.A_MEMBER_ID='" & strDBBuddiesOnline(i) & "' "
strDBBuddiesOnlineCount = strDBBuddiesOnlineCount + 1
else
strSQL = strSQL & "OR " & strMemberTablePrefix & "Active_Users.A_MEMBER_ID='" & strDBBuddiesOnline(i) & "' "
strDBBuddiesOnlineCount = strDBBuddiesOnlineCount + 1
end if
next
strSQL = strSQL & "ORDER BY " & strMemberTablePrefix & "Active_Users.A_MEMBER_USERNAME asc "
Response.Write strSQL & "<br>"
set rsBuddiesOnline = my_Conn.Execute (strSQL)
Response.Write strSQL & "<br>"

if rsBuddiesOnline.eof or rsBuddiesOnline.bof then
else
do until rsBuddiesOnline.EOF
Response.Write "<FONT color=""#000000"" face=""Verdana, Arial, Helvetica, sans-serif"" size=""1"">   <a href=""" & strSiteBaseURL & "members/profile.asp?sessionid=" & strUserSessionID & "&mode=display&id=" & rsBuddiesOnline("A_MEMBER_ID") & """>" & rsBuddiesOnline("A_MEMBER_USERNAME") & "</a></font><br>"
rsBuddiesOnline.movenext
loop
end if

end if
end if


Brad

gor
Retired Admin

Netherlands
5511 Posts

Posted - 14 April 2001 :  01:37:22  Show Profile  Visit gor's Homepage
What is the error it throws ?

Pierre
Join the Snitz WebRing
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 14 April 2001 :  12:05:40  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
ERRRRRRRRRRr

I didnt change anything and now it works. WTF. I went and removed the stuff in red..

if rsBuddiesOnline.eof or rsBuddiesOnline.bof then
else

do until rsBuddiesOnline.EOF
Response.Write "<FONT color=""#000000"" face=""Verdana, Arial, Helvetica, sans-serif"" size=""1""> <a href=""" & strSiteBaseURL & "members/profile.asp?sessionid=" & strUserSessionID & "&mode=display&id=" & rsBuddiesOnline("A_MEMBER_ID") & """>" & rsBuddiesOnline("A_MEMBER_USERNAME") & "</a></font><br>"
rsBuddiesOnline.movenext
loop
end if

and the buddies online showed up. the i put the stuff in red back in and it works. hum,mmmm i dont know.

Brad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07