Error code 19 on SlqiliteDatabase.Insert();

I'm having a hard time finding a bug here, I have to ask for a help.

I'm creating ContentValues and inserting them using this simple method:

public long insertValues(String tableName, ContentValues values) {      
    return SQLDb.insert(tableName, null, values);   
}

Method sure works, I used it many times to insert values to other tables, having problem with only one table which structure is presented on the picture below:

Method fails as it returns id -1. I did contentValues.toString() before and got this:

repeatability=monthly value=1800.0 category_id=17 _id=1 kind=inc name=ECCO

Important notes:

  • Table is empty in the moment of inserting

What am i missing here?

Answers


The problem is probably in some field in the table that has the NOT NULL constraint.


Need Your Help

Android CAB listview state_selected and state_pressed

android android-listview android-selector android-contextmenu

I have a problem: I have a ListView with a MULTI_CHOICE listener that opens up the ContextualActionBar. For each item in this list I've setted a backround on the root layout. This is the XML:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.