コンテンツプロバイダー経由での、SQLiteのautoincrementのリセットの方法

59 views
Skip to first unread message

takuya

unread,
Mar 17, 2012, 8:43:07 AM3/17/12
to android-g...@googlegroups.com
お世話になります。

コンテンツプロバイダー経由での、SQLiteのautoincrementの値をリセットしたいのですが、

例えば、以下のSQLを、

update sqlite_sequence set seq=1 where name='table';

コンテンツプロバイダーの以下のメソッド、または他の方法で実行することは可能なのでしょうか?

@Override
    public int update(Uri uri,ContentValues values, 
        String selection,String[] selectionArgs) {
        return db.update(DB_TABLE,values,selection,selectionArgs);
    } 

http://www.saturn.dti.ne.jp/npaka/android/DBProviderEx/index.html より )


以上、よろしくお願い致します。
Reply all
Reply to author
Forward
0 new messages