خرید بک لینک

Vote count: 0

How to check if there was conflict in SQLite Data Base in Android upon inserting? I am using unique keys on 3 rows (id, isbn, google_id) and I simply always add and ignore conflict. What are the ways to get conflicts upon inserting in entry already exists. Should I query before or I can get like "some kind of trace back" so that I will be able to notify user that entry already exists?

 SQLiteDatabase db = this.getWritableDatabase();      
 ContentValues values = new ContentValues();
 values.put(KEY_TITLE, book.getTitle());
 values.put ...

long id = db.insertWithOnConflict(TABLE_BOOKS,
          null,
          values,
          SQLiteDatabase.CONFLICT_IGNORE);


 db.close();
 return (int) id;

asked 33 secs ago

برچسب: how to check oil,how to check internet speed,how to check for lice,how to check for bed bugs,how to check your credit score,how to check data usage on iphone,how to check blood pressure,how to check if iphone is unlocked,how to check heart rate,how to check cpu temp, نویسنده: استخدام کار تاريخ: پنجشنبه 28 مرداد 1395 ساعت: 14:04

صفحه بندی