Re: Transactions and saving - problems with commit

2003-09-18 Thread Scott Eade
Ashley Hayes wrote: conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Transaction.commit(conn); More standard would be to replace the first line above with: conn = Transaction.begin(

Re: Transactions and saving - problems with commit

2003-09-18 Thread Graham Leggett
Graham Leggett wrote: conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Oops - ignore me - I had specified contact.save() instead of contact.save(conn), which caused the problem, which

Re: Transactions and saving - problems with commit

2003-09-18 Thread Graham Leggett
Ashley Hayes wrote: think you need to get a DB connection to do the saving with... conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Transaction.commit(conn); This is exactly what I am

RE: Transactions and saving - problems with commit

2003-09-18 Thread Ashley Hayes
think you need to get a DB connection to do the saving with... conn = Transaction.beginOptional("yourb DB name", true); // then save with the conn object contact.save(conn ); company.setContact(contact); company.save(conn ); Transaction.commit(conn); -Original Message- From: Graham Leg