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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Usergroups Beta Error
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jeffery
Junior Member

USA
176 Posts

Posted - 20 August 2003 :  00:26:55  Show Profile
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

Posted - 20 August 2003 :  18:35:01  Show Profile
Anyone?

www.thomasforum.com
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 21 August 2003 :  03:08:43  Show Profile
??!!??? The link to post.asp is NOT post.asp

The best thing would be to check the installation steps again..
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 21 August 2003 :  03:16:16  Show Profile
Sorry, it is now. I have checked the installation but I'll check again, thanks.

www.thomasforum.com
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 21 August 2003 :  13:39:14  Show Profile
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
Go to Top of Page

ajhvdb
Junior Member

Netherlands
392 Posts

Posted - 22 August 2003 :  15:30:38  Show Profile
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
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 22 August 2003 :  19:13:29  Show Profile
Makes sense, wonder why they were different. Thanks ajhvdb!

www.thomasforum.com
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 22 August 2003 :  19:19:53  Show Profile
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
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 22 August 2003 :  19:38:06  Show Profile
Changed it to what you have and it works now. Thanks again ajhvdb.

www.thomasforum.com
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 22 August 2003 :  21:00:56  Show Profile
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 ~
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 26 August 2003 :  01:15:05  Show Profile
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
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.44 seconds. Powered By: Snitz Forums 2000 Version 3.4.07