Finally I got an Error :)

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Finally I got an Error :)

Post by Kaan1983 » 2008-05-01 16:24

Hey everybody,

hMail still works great. I'm getting more users (slowly) and testing my system.

Finally after one year with hMail I got an Error:

Code: Select all

"ERROR"	4564	"2008-05-01 13:39:17.064"	"Severity: 2 (High), Code: HM5032, Source: DALConnection::Execute, Description: Source: ADOConnection::Execute(), Code: HM10044, Description: Error while executing SQL statement: 
INSERT INTO hm_accounts (accountdomainid, accountaddress, accountpassword, accountactive, accountisad, accountaddomain, accountadusername, accountmaxsize, accountvacationmessageon, accountvacationmessage, accountvacationsubject, accountvacationexpires, accountvacationexpiredate, accountpwencryption, accountadminlevel, accountforwardenabled, accountforwardaddress, accountforwardkeeporiginal, accountenablesignature, accountsignatureplaintext, accountsignaturehtml, accountlastlogontime, accountpersonfirstname, accountpersonlastname) VALUES (1, 'muratak@domain.org', '785d425ab10d316e9f88a8153dd0e2f8', 1, 0, '', '', 100, 0, '', '', 0, '2008-05-01', 2, 0, 0, '', 0, 0, '', '', '2008-05-01 13:38:58', '', '')
Microsoft OLE DB Provider for SQL Server
Violation of UNIQUE KEY constraint 'u_accountaddress'. Cannot insert duplicate key in object 'dbo.hm_accounts'."
It seems that account was already created and hMail dealed with the duplication. However, how can I deal with the error at user interface? I'm already checking if the address is existing or not though.

Thanks.
Kaan

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Finally I got an Error :)

Post by martin » 2008-05-02 12:46

What version are you using?
Is this in an administration interface which you've written yourself? If so, I'm guessing that you don't check properly whether the address really exists before trying to add it...

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Finally I got an Error :)

Post by Kaan1983 » 2008-05-02 15:44

I'm using the latest alpha.
Yes I programmed myself. It probably occured because a user clicked several times the 'create mail' button.
I'll disable the button first in on_button_click event. Let's see if it will ever occur again.

Thank you.

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Finally I got an Error :)

Post by Kaan1983 » 2008-05-02 16:53

I just checked and yes, definately, multiple clicking caused the error:

"ERROR" 4564 "2008-05-01 13:39:17.064"
"ERROR" 4564 "2008-05-01 13:39:35.707"
"ERROR" 4564 "2008-05-01 13:39:53.819"
"ERROR" 4564 "2008-05-01 13:40:11.921"
"ERROR" 4564 "2008-05-01 13:40:30.113"
"ERROR" 4564 "2008-05-01 13:40:48.195"
"ERROR" 4832 "2008-05-01 13:41:06.337"
"ERROR" 4832 "2008-05-01 13:41:24.900"

:D I got some impatient users (9 clicks in 2 seconds :) )

User avatar
martin
Developer
Developer
Posts: 6834
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Re: Finally I got an Error :)

Post by martin » 2008-05-02 23:56

So when you finally got an error, it wasn't even an error in hMailServer. ;)

Kaan1983
Senior user
Senior user
Posts: 595
Joined: 2007-01-30 16:26
Location: TÜRKIYE

Re: Finally I got an Error :)

Post by Kaan1983 » 2008-05-03 01:46

You are right!

Seriously what I thought: God bless Martin, hMailServer got my back today. Even when my stupid system failed, hMailServer didn't.

Thank you again.:)

Post Reply