mercredi 4 novembre 2015

how to insert unique value into virtual table using (fts3)

i have created a virtual table.i the problem is i cannot insert unique value into my virtual table database using fts3. here is my create table code

 public static final String DATABASE_CREATE =
            "CREATE VIRTUAL TABLE " + FTS_VIRTUAL_TABLE + " USING fts3(" +
                    KEY_CUSTOMER + " text UNIQUE," +
                    KEY_NAME + " NOT NULL," +
                    KEY_ADDRESS1 + " NOT NULL," +
                    KEY_ADDRESS2 + " NOT NULL," +
                    KEY_CITY + " NOT NULL," +
                    KEY_STATE + " NOT NULL," +
                    KEY_ZIP + " NOT NULL," +
                    KEY_SEARCH + "," +
                    KEY_AMOUNT + " NOT NULL," +
                    " UNIQUE (" + KEY_CUSTOMER + "));"; 

here i want KEY_CUSTOMER as unique, it's not working i can store same name many times ...its ignoring my UNIQUE statement

Aucun commentaire:

Enregistrer un commentaire