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.....adding a usergroup error
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Bummer
Starting Member

31 Posts

Posted - 16 July 2003 :  21:33:16  Show Profile
Hello

I have installed the usergroups mod to my forum but whenever I try to add a user group I get this error.

ADODB.Recordset error '800a0e79'

Operation is not allowed when the object is open.

/admin_usergroups.asp, line 118


If you can help at all that would be great.
If you need to log in to look at something, go to my forum http://forum.poultryyouth.com/default.asp and you can log in using the user name Snitz password Snitz.
thanks for your time

Anthony

Adminstrator of the Poultry Youth of America. www.poultryyouth.com

altisdesign
Junior Member

United Kingdom
357 Posts

Posted - 17 July 2003 :  07:44:29  Show Profile
Are you using MySQL? Cos if so I had the same error when I tried to add a usergroup, I rewrote it so it would have an INSERT() clause instead of inserting using a recordset to insert the new usergroup.I can post the code I used if that would help, but I'm not sure if its the best solution, or whether Nikkol can help you more..

Altis Design offers all manner of web design services to a variety of commercial and personal clients
Go to Top of Page

Bummer
Starting Member

31 Posts

Posted - 17 July 2003 :  08:56:41  Show Profile
altisdesign

yes that seems to be the problem we are having. could you please post the code?
thanks
Anthony

Adminstrator of the Poultry Youth of America. www.poultryyouth.com
Go to Top of Page

altisdesign
Junior Member

United Kingdom
357 Posts

Posted - 17 July 2003 :  09:32:45  Show Profile
This is what I used, it seemed to work for me, hope it works for you BTW --> I don't think the Beta Mod was supposed to have been installed on a production forum yet... Anyways the code:

Find the following code in admin_usergroups.asp, starting line 114:


		If strConfirm = "Add Group" Then
			'## check for usergroup name uniqueness
			set rsGroup = Server.CreateObject("ADODB.Recordset")
			rsGroup.open strTablePrefix & "USERGROUPS", my_Conn, 1, 3, 2
			rsGroup.CursorLocation = 2	'Added for MySql
			rsGroup.AddNew
			rsGroup("USERGROUP_NAME") = Request.Form("GroupName")
			rsGroup("USERGROUP_DESC") = Request.Form("GroupDesc")
			rsGroup.Update
			GroupID = rsGroup("USERGROUP_ID")
			rsGroup.Close
			set rstGroup = Nothing
			Response.Redirect("admin_usergroups.asp?mode=Modify&ID=" & GroupID)
		End If




Replace that with the following code:


		If strConfirm = "Add Group" Then
			my_Conn.execute("INSERT INTO forum_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 forum_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


-Altis Design

Altis Design offers all manner of web design services to a variety of commercial and personal clients
Go to Top of Page

vmplanet
Junior Member

112 Posts

Posted - 23 July 2003 :  20:09:22  Show Profile
This is the error i get when i try to make a new forum: (Forum runs on MySql)

Microsoft OLE DB Provider for ODBC Drivers error '80040e09'
[TCX][MyODBC]You have an error in your SQL syntax near 'AND USERGROUP_ID = 19' at line 1

/forum/post.asp, line 1542
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 23 July 2003 :  21:36:14  Show Profile
Can you save post.asp a text file and post a link?

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

JohnO
Starting Member

United Kingdom
21 Posts

Posted - 05 August 2003 :  06:36:40  Show Profile
I have just installed this mod and got the same error as reported by Bummer (although I use an Access database).

I implemented the fix suggested by AltisDesign and now get the following error:

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] The field 'forum_usergroups.USERGROUP_TYPE' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field.
/engweb_Local/ateforum/admin_usergroups.asp, line 115


Can I assume that it is ok to change the USERGROUP_TYPE, AUTOJOIN, MEM_HIDE and MOD_HIDE fields to "not required" (for the moment)?

Thanks,
John
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 05 August 2003 :  06:44:19  Show Profile
NO! The code should work for Access. What connection string are you using? Switch to the Jet driver connection string and the original code should work for you.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~

Edited by - Nikkol on 05 August 2003 06:46:25
Go to Top of Page

JohnO
Starting Member

United Kingdom
21 Posts

Posted - 05 August 2003 :  07:04:58  Show Profile
Sorry, it's exactly the same (well nearly):

Error Type:
Microsoft JET Database Engine (0x80004005)
The field 'forum_usergroups.USERGROUP_TYPE' cannot contain a Null value because the Required property for this field is set to True. Enter a value in this field.
/engweb_Local/ateforum/admin_usergroups.asp, line 115

And I still got the original error about "Operation is not allowed when the object is open" as well until I re-applied Altis Design's mod.

This is the code section from admin_usergroup.asp. There is no data being supplied for the required fields.


		If strConfirm = "Add Group" Then
			'## check for usergroup name uniqueness
			set rsGroup = Server.CreateObject("ADODB.Recordset")
			rsGroup.open strTablePrefix & "USERGROUPS", my_Conn, 1, 3, 2
			rsGroup.CursorLocation = 2	'Added for MySql
			rsGroup.AddNew
			rsGroup("USERGROUP_NAME") = Request.Form("GroupName")
			rsGroup("USERGROUP_DESC") = Request.Form("GroupDesc")
			rsGroup.Update
			GroupID = rsGroup("USERGROUP_ID")
			rsGroup.Close
			set rstGroup = Nothing
			Response.Redirect("admin_usergroups.asp?mode=Modify&ID=" & GroupID)
		End If


John

Edited by - JohnO on 05 August 2003 07:06:16
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 05 August 2003 :  20:37:55  Show Profile
How did you create those tables? All the fields you mentioned should have default values set for them of 0. Make sure they all have a default value set and you should be okay.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

JohnO
Starting Member

United Kingdom
21 Posts

Posted - 06 August 2003 :  04:34:48  Show Profile
Hi Nikkol,
I followed the MOD document and pasted the code below into the "Alternate MOD setup" box. It didn't report any errors but you are correct, there were no default values set. Does it make any difference what type of database is used? I have an Access 97 version.

Also, what about the "Operation is not allowed when the object is open" error? Is this related to the "age" of the database as well? Or the drivers perhaps? Our web server is an NT box, but my local dev system is W2k.


[CREATE]
USERGROUPS
USERGROUP_ID
USERGROUP_NAME#varchar(100)##
USERGROUP_DESC#memo#NULL#
USERGROUP_TYPE#int##0
AUTOJOIN#int##0
MEM_HIDE#int##0
MOD_HIDE#int##0
[END]

[CREATE]
USERGROUP_MEMBERS

USERGROUP_ID#int##
MEMBER_ID#int##
MEMBER_TYPE#int##1
[END]

[CREATE]
ALLOWED_USERGROUPS

USERGROUP_ID#int##
FORUM_ID#int##
PERMS#int##0
[END]

[INSERT]
CONFIG_NEW
(C_VARIABLE,C_VALUE)#('STRUGVIEW','0')
(C_VARIABLE,C_VALUE)#('STRUGMEMVIEW','0')
(C_VARIABLE,C_VALUE)#('STRUGMODFORUMS','0')
[END]


John
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 06 August 2003 :  07:11:51  Show Profile
It might be the fact that it is an Access97 database. (Access97 might not support getting the last record inserted the way I did it.) I can't be sure though. I suspect that the default values didn't get set because you were using the Access driver connection string before.

I have a to-do list for the official release package of this MOD and I'm going to redo that part anyway. If you can make the default value changes and if the changes to the code work for you, then just check back here every so often to see for the release (I'll include instructions on what to do to make changes to the beta version.)

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page

JohnO
Starting Member

United Kingdom
21 Posts

Posted - 06 August 2003 :  07:26:05  Show Profile
Thanks Nikkol.

I have made the changes "manually" along with the AltisDesign fix and everything is behaving normally (so far). Excellent mod. Thanks.

John
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 01 September 2003 :  11:39:34  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message
Yes! This worked for me too, nice! Have done alittle testing and it seems like it work allright. Great mod! =)

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Baroudeur
Starting Member

25 Posts

Posted - 26 September 2003 :  19:31:51  Show Profile
on that part

If strConfirm = "Add Group" Then
my_Conn.execute("INSERT INTO forum_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 forum_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)

i had to strike on part or i have error in order, all works fine now, but the stiked part is useful or no ?

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!

Edited by - Baroudeur on 28 September 2003 10:28:20
Go to Top of Page

Baroudeur
Starting Member

25 Posts

Posted - 28 September 2003 :  10:25:53  Show Profile
Niiiice mod really

Just a last tiny pb when i try to create a new forum i have this error now
Type d'erreur :
Microsoft JET Database Engine (0x80040E14)
Erreur de syntaxe (opérateur absent) dans l'expression 'FORUM_ID = AND USERGROUP_ID = 2'.
/forumaargh/post.asp, line 1564

Seems forum id is missing, someone can give me help ?

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!

Edited by - Baroudeur on 28 September 2003 10:28:39
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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 1.39 seconds. Powered By: Snitz Forums 2000 Version 3.4.07