Print Page | Close Window

80020009 - register.asp

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=21818
Printed Date: 08 April 2026 at 3:04pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: 80020009 - register.asp
Posted By: MortiOli
Subject: 80020009 - register.asp
Date Posted: 02 November 2006 at 9:25pm
Borg,
 
I did a search on this, and came across a couple of topics, but nothing with a definate fix, so I was hoping I might be able to provide you with the info you need to get to the bottom of this error...
 
When a user registers, they receive the following error after they submit, and do not receive a welcome email;
 
error '80020009'

/forum/register.asp, line 977

 
Line 977 is the one in red;
 
   'Disable error trapping
   On Error goto 0
                        'Re-run the query to read in the updated recordset from the database
                        .Requery
                        'Read back in the user ID for the activation email
                  lngUserProfileID = CLng(.Fields("Author_ID"))
                  'Close rs
                  .Close
                End With
 
 
Now in the past I've upgraded from Snitz to WWF 7.x, and then from 7.x to 8.x
 
I'm currently running version 8.04, and only noticed this error recently (ie, in version 8.x).
 
My server is Windows Server 2003, running IIS v6.0
My database is MS SQL v8.0.2039
 
I've re-uploaded register.asp to make sure it's not a corrupt file, and still receive the same error.
 
I've also posted a topic regarding a difference in my SQL database to what it should be, even after upgrading my WWF and database from 7 to 8.  Is there anything I can run to tell me if anything is different to a blank WWF install, than to the install I have?  Ie, incase of corruption in upgrading etc.



Replies:
Posted By: WebWiz-Bruce
Date Posted: 03 November 2006 at 9:18am
As I recall from a previous post you made your default values in your database where not correct and so where coursing the problem.

The same seems true for this error.

The best course of action would be to go through the database and make sure you have correctly set default values for all those fields that require them


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 03 November 2006 at 9:41pm
That's right, some seem to be different.
 
Is there anyway I can run the msSQL_server_setup.asp page, to update the tables, instead of creating them?
 
Ie, if I went through the file and changed CREATE to ALTER?
 
I'm not too sure on SQL, so don't know what would do what etc.
 
EDIT - Maybe if someone could write a script to compare what the database should have set, and what it is actually set to, it would help a lot of people after upgrades / migrations?  Hopefully someone might jump up and lend a hand Wink


Posted By: MortiOli
Date Posted: 04 November 2006 at 11:09pm
Right, I've gone through my whole database, and checked everything against a clean install - there was a number of differences, but everything has now been rectified.
 
However, when registering a new user again, I'm still receiving the following error;
 
error '80020009'

/forum/register.asp, line 977

 
Any ideas what could be causing this?
 
Just another question...can I remove all the stored procedures in my MS SQL database now, as I read that version 8.x doesn't use these anymore?
 
Cheers Borg.


Posted By: WebWiz-Bruce
Date Posted: 06 November 2006 at 9:33am
Check in the database that an ID number for the new member has been created.

You can also remove any stored procedures from the database


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 06 November 2006 at 6:19pm
Yeah, an Author_ID number has been created.
 
The user is created ok (apart from the error), but no activation email is sent.  If I try and login, and tell it to resend the email, it sends ok and I can continue to use the account.
 
Here's what the record looks like for the new user;
 
Author_ID Group_ID Username Real_name User_code Password Salt Author_email Homepage Location MSN Yahoo ICQ AIM Occupation Interests DOB Signature No_of_posts Join_date


Posted By: WebWiz-Bruce
Date Posted: 06 November 2006 at 6:25pm
It's really difficult to say what the problem is, the error looks database related.

The line in question reads back in the new users ID from the database after the new user has been created, this is used for activation emails etc.

If this line doesn't run then the rest of the page can not run correctly.

Because you have made so many changes to the database converting from one type to another etc. it's going to be very hard getting to the bottom of the problem.

The only way I can suggest is keep trying till you find the answer.



-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 06 November 2006 at 6:32pm
I'm a bit stumped.  I don't know what else could be causing it, as I've corrected all the database discrepancies.
 
If you or anyone else has any more suggestions, please fire them this way...
 
Just as a double check, this is what my tblAuthor looks like;
 
Key Ident Seed Incr Column Name Data Type Allow Nulls
Checked Checked 1 1 Author_ID int Unchecked
Unchecked Unchecked 0 0 Group_ID int Unchecked
Unchecked Unchecked 0 0 Username nvarchar(25) Unchecked
Unchecked Unchecked 0 0


Posted By: WebWiz-Bruce
Date Posted: 06 November 2006 at 6:41pm
Whats Incr 1 all about, I've not seen this before, are you using Microsoft's SQL Server management Studio to work on the database?


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: MortiOli
Date Posted: 08 November 2006 at 8:15pm

Yeah I'm using Microsoft SQL Server Management Studio - that table was pulled off Enterprise Manager though, as it's easier to export info.

The Incr is found under;
 
Identity Specification
   (Is Indentity)             Yes
   Identity Increment    1
   Identity Seed            1


Posted By: MortiOli
Date Posted: 13 November 2006 at 9:18pm
Anyone have any ideas please?


Posted By: MortiOli
Date Posted: 18 November 2006 at 10:31am
Is there anyway of adding some code to show more information on the error?
 
I really need to get this working, because new members don't receive any email etc, and never return because of this.


Posted By: dpyers
Date Posted: 18 November 2006 at 3:59pm
Don't know if this helps or not:
http://classicasp.aspfaq.com/general/why-do-i-get-80020009-errors.html - http://classicasp.aspfaq.com/general/why-do-i-get-80020009-errors.html


-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: MortiOli
Date Posted: 19 November 2006 at 12:41pm
Unfortunately I can't see anything on there which could cause / solve the problem


Posted By: MortiOli
Date Posted: 26 November 2006 at 1:05am
Please, does anyone have any ideas whatsoever?


Posted By: Michel_K17
Date Posted: 26 November 2006 at 9:08pm
Am having the same problem with an Access database. Here are a couple of solutions posted elsewhere on this forum:

1. This is a problem that effects only a few servers, if you remove line 977 of register.asp it should fix the issue.

2. Another option is to replace line 977 with this:
If NOT isNull(.Fields("Author_ID")) Then lngUserProfileID = CLng(.Fields("Author_ID"))

2. Make sure that you have correctly set the forum orders within the admin section so that forums display correctly.




Posted By: Michel_K17
Date Posted: 26 November 2006 at 9:30pm
OK, I got it to work, as follows.

I tried #2 above >> Same problem

I commented out lines 973 to 977 (requery & reload of authorID). I felt pretty confident that it would be fine because the authorID is reloaded later in the code before sending the e-mail anyway.  I tested it and it worked OK for me.

Cheers!


Posted By: MortiOli
Date Posted: 27 November 2006 at 12:46pm
Brilliant!
 
I commented out lngUserProfileID = CLng(.Fields("Author_ID")) (line 977) and it's now working fine!
 
Thanks Michel!
 
Why does that cause an error on some servers?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net