Heylo,

I am trying to create a form that will add the values to my database.  The table's primary key, aid, is an auto increment column.  Whenever I fill all of the values in the form and hit submit to add the data to the database, I get the following error:

Application: OnTrack
Error: java.lang.IllegalArgumentException: attempt to insert a null object into this context
Reason: attempt to insert a null object into this context 

I have checked to make sure that I am not leaving out any fields that are not null.  As a matter of fact, the only field I am leaving out is the aid field.  Here is my data for the submit button:

public WOComponent addAnnouncement()
    {
        EOEditingContext ec = session().defaultEditingContext();
ec.insertObject(newAnnouncement);
ec.saveChanges();
newAnnouncement = new Announcement();
return null;
    }

I am confused and tired.  Any help is greatly appreciated.

Peace,

Vickie
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to