inserting into sqlite through content provider
<p>I have implemented a content provider with a sqlite as backend.  My table creation looks like</p>

<pre><code>private static final String PLAYER_TABLE_COLUMN_NAME = "player_name";
private static final String PLAYER_TABLE_COLUMN_NUM = "player_num";
@Override
public void onCreate(SQLiteDatabase db) {

    String buildSQL = "CREATE TABLE " + TABLE_NAME + "( " + PLAYER_TABLE_COLUMN_ID + " INTEGER PRIMARY KEY, " + PLAYER_TABLE_COLUMN_NAME + " TEXT, "+ PLAYER_TABLE_COLUMN_NUM + " TEXT )";
    db.execSQL(buildSQL);
}

public void insertData (String aPersonName, String aPersonPin) {

    SQLiteDatabase db = this.getWritableDatabase();
    ContentValues contentValues = new ContentValues();

    contentValues.put(PLAYER_TABLE_COLUMN_NAME, aPersonName);
    contentValues.put(PLAYER_TABLE_COLUMN_NUM, aPersonPin);
    db.insert(TABLE_NAME, null, contentValues);
}
</code></pre>

<p>and my content provider, the insert method looks like</p>

<pre><code>@Override
public Uri insert(Uri uri, ContentValues values) {

    SQLiteDatabase db = dbHelper.getWritableDatabase();
    switch (uriMatcher.match(uri)) {
    case ALL_PLAYERS:
         break;
    default:
         throw new IllegalArgumentException("Unsupported URI: " + uri);
    }

    long id = db.insert("players_table", null, values);
    getContext().getContentResolver().notifyChange(uri, null);
    return Uri.parse(CONTENT_URI + "/" + id);
}
</code></pre>

<p>In my main activity, I have something like</p>

<pre><code>ContentValues contentValues = new ContentValues();

contentValues.put("player_name", PlayerName);
contentValues.put("player_num", PlayerNum);
getContentResolver().insert(MyContentProvider.CONTENT_URI, contentValues);
</code></pre>

<p>then from logcat, I am getting sqlite error</p>

<p>table players_table has no column named player_name (code 1):</p>

<p>but if I use </p>

<pre><code>databaseHelper.insertData(PlayerName, PlayerNum);
</code></pre>

<p>to insert directly, it works fine.  can anyone see an obvious mistake? I just can't figure it out...</p>
