• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Saving data in the db
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Saving data in the db


  • Subject: Saving data in the db
  • From: Gustavo Pizano <email@hidden>
  • Date: Tue, 18 Mar 2008 10:54:39 -0500

Hello.. well I did the following this morning  like at 1am .

     DetallesXAspirante da = DetallesXAspirante.createDetallesXAspirante(session().defaultEditingContext(),
    Integer.valueOf(doc).intValue() , eMail, Integer.valueOf(espe).intValue(),
    Integer.valueOf(idiom).intValue(), Integer.valueOf(nivForm).intValue());

    

    Aspirante a = Aspirante.createAspirante(session().defaultEditingContext(), 
    dir, Integer.valueOf(doc).intValue(), tel, da);

    

    

    session().defaultEditingContext().saveChanges();

So, it id work, I was jsut wondering if its the correct way to do it, I know there should be a try catch when the saveChanges() its invoked ,  but how can If there was an error with the connection, or a duplicate PK,  yes I can get the message and show it, but the idea is that the system should say the user what was the error in a friendly way, like if the new aspirante its already in the db,.. or somehing like that..
Thanks

 Gus

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Binding question
  • Next by Date: Re: Binding question
  • Previous by thread: Re: Binding question
  • Next by thread: forcing component reload
  • Index(es):
    • Date
    • Thread