Author |
Topic |
|
ROB
Junior Member
USA
347 Posts |
Posted - 23 April 2002 : 21:08:04
|
Since installing Active Users 4.0, I noticed a problem that only crops up when and if someone logs out.
They get the following error message: quote: Microsoft OLE DB Provider for SQL Server error '80040e14'
Incorrect syntax near the keyword 'AND'.
/forums/inc_functions.asp, line 1163
Line 1163 refers to this the red line in the following function (which has not been modified):
function chkForumModerator(fForum_ID, fMember_Name) '## Forum_SQL strSql = "SELECT mo.FORUM_ID " strSql = strSql & " FROM " & strTablePrefix & "MODERATOR mo, " & strTablePrefix & "MEMBERS me " strSql = strSql & " WHERE mo.FORUM_ID = " & fForum_ID & " " strSql = strSql & " AND mo.MEMBER_ID = me.MEMBER_ID " if strAuthType = "db" then strSql = strSql & " AND me.M_NAME = '" & fMember_Name & "'" elseif strAuthType = "nt" then strSql = strSql & " AND me.M_USERNAME = '" & fMember_Name & "'" end if
Set rsChk = Server.CreateObject("ADODB.Recordset") rsChk.open strSql, my_Conn if rsChk.bof or rsChk.eof then chkForumModerator = "0" else chkForumModerator = "1" end if rsChk.close set rsChk = nothing end function
Leads me to believe there's a problem with the AND clause in the SQL statement. The strange thing is, everything else works. Login, logout works (in spite of the error message), etc.
Anyone have any clues why might have gone awry?
Jeff Hester http://www.bigblueball.com Absolutely everything about Instant Messaging & Chat |
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 23 April 2002 : 21:19:25
|
My question is. . . what does the checkForumModerator function have to do with logging out?
<edit> The only connection I can come up with between that function and Active users is that I use the same variable name fForum_ID in a function on active_users.asp. . . but I logged out from active_users.asp without any problems.
Nathan Bales Snitz Exchange | Do's and Dont's
Edited by - Nathan on 23 April 2002 21:30:16 |
|
|
ROB
Junior Member
USA
347 Posts |
Posted - 23 April 2002 : 21:41:53
|
Yeah, doesn't make any sense. I'll follow that lead.
I should have mentioned that logging out from certain pages works fine (like default.asp), but logging out from forum.asp or topic.asp causes the error.
Jeff Hester http://www.bigblueball.com Absolutely everything about Instant Messaging & Chat |
|
|
|
Topic |
|