Author |
Topic |
|
jeffery
Junior Member
USA
176 Posts |
Posted - 20 August 2003 : 00:26:55
|
Microsoft OLE DB Provider for SQL Server error '80040e14'
Incorrect syntax near the keyword 'AND'.
/post.asp, line 1613
http://aaron.freelancedeveloper.com/post.asp.txt
This is what I get when I response.write that strSql
SELECT PERMS FROM FORUM_ALLOWED_USERGROUPS WHERE FORUM_ID = AND USERGROUP_ID = 3
So, the problem is the strRqForumID variable
Almost seems like this would be NULL since you havent created this topic yet??
|
www.thomasforum.com |
|
jeffery
Junior Member
USA
176 Posts |
|
ajhvdb
Junior Member
Netherlands
392 Posts |
Posted - 21 August 2003 : 03:08:43
|
??!!??? The link to post.asp is NOT post.asp
The best thing would be to check the installation steps again.. |
|
|
jeffery
Junior Member
USA
176 Posts |
Posted - 21 August 2003 : 03:16:16
|
Sorry, it is now. I have checked the installation but I'll check again, thanks. |
www.thomasforum.com |
|
|
jeffery
Junior Member
USA
176 Posts |
Posted - 21 August 2003 : 13:39:14
|
Checked, the installation is correct as far as I can see. I removed that variable in the sql query and its working. Not sure what problems this causes. Seems ok so far. |
www.thomasforum.com |
|
|
ajhvdb
Junior Member
Netherlands
392 Posts |
Posted - 22 August 2003 : 15:30:38
|
My installed code looks diff then yours, the red if statement is missing in your posts.asp!
strPerms = Null
if strRqMethod = "EditURL" or strRqMethod = "EditForum" then
strSql = "SELECT PERMS FROM " & strTablePrefix & "ALLOWED_USERGROUPS " &_
"WHERE FORUM_ID = " & strRqForumID & " AND USERGROUP_ID = " & arUGs(0,UGCnt)
set rsPerms = my_Conn.execute(strSql)
if not rsPerms.bof and not rsPerms.eof then strPerms = rsPerms("PERMS")
rsPerms.close
set rsPerms = Nothing
end if |
Edited by - ajhvdb on 22 August 2003 15:32:02 |
|
|
jeffery
Junior Member
USA
176 Posts |
Posted - 22 August 2003 : 19:13:29
|
Makes sense, wonder why they were different. Thanks ajhvdb!
|
www.thomasforum.com |
|
|
jeffery
Junior Member
USA
176 Posts |
Posted - 22 August 2003 : 19:19:53
|
This is the code from the installation notes:
if not IsNull(arUGs) then
for UGCnt = LBound(arUGs,2) to UBound(arUGs,2)
if (arUGs(2,UGCnt) = 0 and mlev = 3) or mlev = 4 then
strSql = "SELECT PERMS FROM " & strTablePrefix & "ALLOWED_USERGROUPS " &_
"WHERE FORUM_ID = " & strRqForumID & " AND USERGROUP_ID = " & arUGs(0,UGCnt)
set rsPerms = my_Conn.execute(strSql)
strPerms = Null
if not rsPerms.bof and not rsPerms.eof then strPerms = rsPerms("PERMS")
rsPerms.close
set rsPerms = Nothing
response.write " <tr>" & vbNewline &_
" <td width=""10"">" & vbNewline &_ |
www.thomasforum.com |
Edited by - jeffery on 22 August 2003 19:37:38 |
|
|
jeffery
Junior Member
USA
176 Posts |
Posted - 22 August 2003 : 19:38:06
|
Changed it to what you have and it works now. Thanks again ajhvdb.
|
www.thomasforum.com |
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 22 August 2003 : 21:00:56
|
jeffery, just a note, you should read the thread about the Beta as it contains some bug fixes. Hopefully I will work on finalizing the mod this weekend. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
|
|
jeffery
Junior Member
USA
176 Posts |
Posted - 26 August 2003 : 01:15:05
|
Thanks, Nikkol, I think that first one was the only one i missed. just so everyone can see what I have .. and it is working for me including saving saved setting after editing post ... here is the code I have now. It's withing the 2nd edit of post.asp per the instructions plus the first fix nikkol posted in the mod's w/code beta topic:
if not IsNull(arUGs) then
for UGCnt = LBound(arUGs,2) to UBound(arUGs,2)
if (arUGs(2,UGCnt) = 0 and mlev = 3) or mlev = 4 then
strPerms = Null
if strRqMethod = "EditURL" or strRqMethod = "EditForum" then
strSql = "SELECT PERMS FROM " & strTablePrefix & "ALLOWED_USERGROUPS " &_
"WHERE FORUM_ID = " & strRqForumID & " AND USERGROUP_ID = " & arUGs(0,UGCnt)
set rsPerms = my_Conn.execute(strSql)
if not rsPerms.bof and not rsPerms.eof then strPerms = rsPerms("PERMS")
rsPerms.close
set rsPerms = Nothing
end if
response.write " <tr>" & vbNewline &_
" <td width=""10"">" & vbNewline &_
" <a href=""usergroups.asp?mode=ViewUsers&ID=" & arUGs(0,UGCnt) & """>" & getCurrentIcon(strIconGroup,"View UserGroup Members","hspace=""0""") & "</a>" & vbNewline
|
www.thomasforum.com |
|
|
|
Topic |
|