I am working on an Android application that supports English and Turkish . The application contains a SQLite database, which contains a column and Autoincrement _id .
When this application works on an English device, it works fine, but when launched on the device, the Turkish database automatically stops creating identifiers.
I tried to retrieve the database file, and open it in the SQLite Database Browser, it stores all columns correctly, only the value of the column _id still empty in the Turkish Language
Ideas to solve this problem?
Edit:
Database creation:
public class DatabaseHandler extends SQLiteOpenHelper {
private final static String TAG = "DatabaseHandler";
private final static int DATABASE_VERSION = 3;
private final static String DATABASE_NAME = "app_main_database";
public DatabaseHandler(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
String query = "CREATE TABLE tbl_item (_id INTEGER PRIMARY KEY NULL, _serverId TEXT NULL, _itemName TEXT NULL, _lastEditDate DATETIME NOT NULL)";
db.execSQL(query);
}
:
@Override
public void insert() {
ContentValues reVal = new ContentValues();
reVal.put(COL_ITEM_SERVER_ID, getItemServerId());
reVal.put(COL_ITEM_NAME, getItemName());
reVal.put(COL_LAST_EDIT_DATE, getLastEditDate());
SQLiteDatabase sqLite = new DatabaseHandler(this).getWritableDatabase();
sqLite.insert(tableName, null, obj.getContentValues());
}