Hi Chris, I recommend asking this question on the Torque Mailing List also. Here is how I tackle this. If I have a unique column, I do a checkBeforeUpdate on my DB. Meaning: I hit the DB checking if there is a record which already has the unique value set.
Kind regards Juergen > -----Ursprüngliche Nachricht----- > Von: Christopher Thill [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 9. Februar 2007 12:33 > An: Turbine Users List > Betreff: Database independent error trapping. > > I am wondering if there is a way to do database independent error > trapping. > > For example on a table/object that has a unique key I just invoke the > .save() method and and trap any exception. I look at the exception to > see if it was a duplicate value in the unique column that caused the > error and then explain this to the user in a friendly message. > > My problem is that I want the system to portable to different database > so I do not want to do something like: > > eSql = (SQLException) t; > if ( !eSql.getSQLState().equals("23505") ) > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]