If I try the update() after create() I get the following SQL error:

java.sql.SQLException: Cannot insert the value NULL into column 'department', table 
'helpdesk.dbo.hlpemployees'; column does not allow nulls. INSERT fails. 

I was stumped by this one for awhile until I tried to rearrange the order and 
everything worked. I'm not sure why I need to update before I create, but that’s what 
took care of my problems with this error message.

-Nick

-----Original Message-----
From: Stein M. Hugubakken [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 20, 2004 2:53 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Duplicate entry problem...


Stein M. Hugubakken wrote:
> 
> And you didn't remove the line "db.update(user.getDepartment());" to 
> see if that is where the problem really is?
> 

What is user.getDepartment() doing anyway, does it require information from/about 
user, like identiy?

What happens if you try to update(department) after create(user) instead?

Stein

-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a 
subject of:
        unsubscribe castor-dev



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.634 / Virus Database: 406 - Release Date: 3/18/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.634 / Virus Database: 406 - Release Date: 3/18/2004
 

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to