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