[android-developers] Re: android.database.sqlite.SQLiteConstraintException: error code 19
mobilek...@googlemail.com wrote: Hi, Has anyone come across this one: android.database.sqlite.SQLiteConstraintException: error code 19. It gets thrown on 'insert', 'update' and 'delete' statements. What is it supposed to mean? At the moment the documentation lacks a signle word about SQL Exceptions and the error codes they throw. Yeah, some of the SQLite exceptions are not very informative. For me, error code 19 means I failed a constraint, such as forgetting to supply a non-NULL/no-default value on an INSERT. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.database.sqlite.SQLiteConstraintException: error code 19
Mark Murphy wrote: mobilek...@googlemail.com wrote: Hi, Has anyone come across this one: android.database.sqlite.SQLiteConstraintException: error code 19. It gets thrown on 'insert', 'update' and 'delete' statements. What is it supposed to mean? At the moment the documentation lacks a signle word about SQL Exceptions and the error codes they throw. Yeah, some of the SQLite exceptions are not very informative. For me, error code 19 means I failed a constraint, such as forgetting to supply a non-NULL/no-default value on an INSERT. And, at the risk of responding to my own message, here's a list of the various SQLite error codes: http://www.sqlite.org/c3ref/c_abort.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.database.sqlite.SQLiteConstraintException: error code 19
hi, you can check the documentation of sqlite itself. as i understand it, it is a thrown when a constraint in the database is violated. e.g. a foreign key constraint or delete constraint. a google let me to the following issue: http://code.google.com/p/android/issues/detail?id=1221 - ronald On Thu, Jan 15, 2009 at 10:43 AM, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, Has anyone come across this one: android.database.sqlite.SQLiteConstraintException: error code 19. It gets thrown on 'insert', 'update' and 'delete' statements. What is it supposed to mean? At the moment the documentation lacks a signle word about SQL Exceptions and the error codes they throw. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.database.sqlite.SQLiteConstraintException: error code 19
Perhaps this will help you: http://www.sqlite.org/c3ref/c_abort.html #define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ On Jan 15, 11:43 am, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, Has anyone come across this one: android.database.sqlite.SQLiteConstraintException: error code 19. It gets thrown on 'insert', 'update' and 'delete' statements. What is it supposed to mean? At the moment the documentation lacks a signle word about SQL Exceptions and the error codes they throw. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: android.database.sqlite.SQLiteConstraintException: error code 19
I couldn't resolve the problem. I think it was to do with my implementation of ContentProvider as the same data manipulation operations worked fine in some situantions and they didnt in others... Thank you for the help, anyway! And, at the risk of responding to my own message, here's a list of the various SQLite error codes: http://www.sqlite.org/c3ref/c_abort.html -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---