Hi Bruce That's what I am currently doing, and it's very slow. Just thought there might be a quicker way. That's OK. It works and that routine is rarely executed.
Thanks! Keith C -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, 5 November 2001 3:03 p.m. To: [EMAIL PROTECTED] Subject: Re: [castor-dev] remove all records... Keith Chew wrote: > > Hi > > Is there a way in Castor to remove all records in a table? ie an equivalent > SQL: "DELETE FROM USER_TABLE;"? > Keith, I would do this: db.getOQLQuery( "select u from userTable u" ); ... while ( results.hasMore() ) { user = ( User ) results.next(); db.remove( user ); } -- +------------------------------+ | Bruce Snyder | | [EMAIL PROTECTED] | +------------------------------+ ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
