Reputation: 300
Cursor mCursor = mDb.query(true, CUSTOMER_TABLE_NAME,
new String[] {GENERIC_ID_KEY, ADDRESS_KEY, PHONE_KEY, EMAIL_KEY,CUSTOMER_NAME_KEY},
GENERIC_ID_KEY + "=" + customerDbId, null,
null, null, null, null);
How should I modify this command if GENERIC_ID_KEY and customerDbId is string. I tried using like in b/w but still negative results, n error is thrown.
Upvotes: 1
Views: 158
Reputation: 1808
It's a cursor problem. Be sure curser is the first state before selection.
Upvotes: 0
Reputation: 4433
if customerDbId is a string type then place it in between quote
as
GENERIC_ID_KEY + "= '" + customerDbId + "'"
Upvotes: 1