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 MOD - Add group error
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 25 February 2005 :  01:13:09  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
Every time I try to add a group from admin_usergroups, I get the following error:

Microsoft JET Database Engine error '80040e14'

Syntax error in ORDER BY clause.

/admin_usergroups.asp, line 117


The group is added successfully, but the page gets stuck on this error.

The lines of code in question are:

	Case "Add", "Modify"			'## add or modify group
		strAddOrModify = "Add Group"
		strConfirm = Request.Form("submit")
		If strConfirm = "Add Group" Then
			my_Conn.execute("INSERT INTO " & strTablePrefix & "USERGROUPS (USERGROUP_NAME,USERGROUP_DESC) VALUES ('" & Request.Form("GroupName") & "', '" & Request.Form("GroupDesc") & "')")
			set rsGroup = Server.CreateObject("ADODB.Recordset")
			set rsGroup = my_conn.execute("SELECT USERGROUP_ID FROM " & strTablePrefix & "USERGROUPS ORDER BY USERGROUP_ID DESC LIMIT 0,1")
			Groupid = rsGroup("USERGROUP_ID")
			rsGroup.Close
			set rsGroup = nothing
			Response.Redirect("admin_usergroups.asp?mode=Modify&ID=" & GroupID)
		End If

eXtremeGossip

Edited by - Jorrit787 on 25 February 2005 01:19:02

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 February 2005 :  05:28:10  Show Profile
Are you using MySQL? If not, there's no need for the LIMIT clause of that statement; use TOP instead.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Jorrit787
Average Member

Netherlands
681 Posts

Posted - 25 February 2005 :  12:44:26  Show Profile  Visit Jorrit787's Homepage  Send Jorrit787 an AOL message  Send Jorrit787 a Yahoo! Message
Thanks, that solved it

eXtremeGossip
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 February 2005 :  12:48:49  Show Profile
You're welcome Remember LIMIT is specific to MySQL, with Access or MSSQL use TOP


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
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.37 seconds. Powered By: Snitz Forums 2000 Version 3.4.07