Exception when using DataBinding on a new entity field

Posts   
 
    
stoneyowl avatar
stoneyowl
User
Posts: 62
Joined: 29-Jan-2004
# Posted on: 21-Dec-2004 17:21:02   

When working with a new entity (IsNew = true), during the process of making sepcialzed bindings to the Format and pase events of the gui controls, I am getting this exception:

Additional information: Property accessor 'EtsDate' on object 'AARTS.LLBLGEN.Adapter.EntityClasses.WarrantDataEntity' threw the following exception:'The entity is out of sync with its data in the database. Refetch this entity before using this in-memory instance.'

The code that triggered this is....


      Binding bind = new Binding("Text",mWarrant,"ETSDate");
      bind.Format += new ConvertEventHandler(Date_Format);
      bind.Parse += new ConvertEventHandler(Date_Parse);
      medETS.DataBindings.Add(bind);

The exception is thrown on the alst line above.

There is no record in the database for this entity (at the moment) so how do I 'resynch' it to the database?

stoneyowl avatar
stoneyowl
User
Posts: 62
Joined: 29-Jan-2004
# Posted on: 21-Dec-2004 21:21:59   

Never mind - my mind is on vacation today.... figured it out.

Ever wonder how you could be so brainless when you are so smart?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 22-Dec-2004 10:12:25   

stoneyowl wrote:

Never mind - my mind is on vacation today.... figured it out. Ever wonder how you could be so brainless when you are so smart?

Does it help if I tell you I patched the query to retrieve the Oracle FK constraints at least 5 times in the last 5 days? wink

Frans Bouma | Lead developer LLBLGen Pro