I have a sqlite database in which So many profile names (String) are stored and i want to determine, whenever user enters a new profile name then app must have to check in the database that the same profile name is already exist or not in the case sensitivity manner . As if there exists "Normal" then again "normal" should not be entered.
for this if there is any query or anything else ,please suggest. Thanks for your consideration.
public boolean isCaseSensitive(String rawprofile)
{
openReadable();
String profile=null;
Cursor mCursor=m_sqLiteDatabase.rawQuery("SELECT Profile_Name FROM Profiles WHERE profile="+rawprofile+"",null);
if(mCursor !=null && mCursor.getCount()>0){
mCursor.moveToFirst();
profile=mCursor.getString(0);
if(profile.equals(rawprofile)){
return true;
}
}
return false;
}