When Adding Members to Selected member list My PC (Ie6.00.2600.00) Sometimes adds a "null" user in the list.
Save Changes results in "error in INSERT INTO" statement and doesn't add all users:
in post_info.asp Find:
sub newForumMembers(fForumID)
on error resume next
if Request.Form("AuthUsers") = "" then
exit Sub
end if
Users = split(Request.Form("AuthUsers"),",")
for count = Lbound(Users) to Ubound(Users)
strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& Users(count) & ", " & fForumID & ")"
my_conn.execute (strSql)
if err.number <> 0 then
Go_REsult err.description, 0
end if
next
end sub
and modify to look like this:
sub newForumMembers(fForumID)
on error resume next
if Request.Form("AuthUsers") = "" then
exit Sub
end if
Users = split(Request.Form("AuthUsers"),",")
for count = Lbound(Users) to Ubound(Users)
if Users(Count) <> " " then
strSql = "INSERT INTO " & strTablePrefix & "ALLOWED_MEMBERS ("
strSql = strSql & " MEMBER_ID, FORUM_ID) VALUES ( "& Users(count) & ", " & fForumID & ")"
my_conn.execute (strSql)
if err.number <> 0 then
Go_REsult err.description, 0
end if
end if
next
end sub
what this does, if it finds a empty "MEMBER_ID" it does not attempt to insert into the database.
oops sorry-fixed
Edited by - kotbh on 22 December 2001 01:12:07