Thread: Error in QUERY
View Single Post
  #1 (permalink)  
Old March 18th, 2010, 05:26 PM
prerna prerna is offline
Registered User
 
Join Date: Mar 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Error in QUERY

Hi,

I am trying to search by database. The user types in a name and I need to search by database for that name and return with that name and the data associated with it. I have used the below statement to do that but could not get it to work.

public Cursor fetchByName(String RName) throws SQLException
{

String[] COLUMNS = new String[]{KEY_ROWID,
KEY_NAME,
KEY_Description,
KEY_Note};

Cursor mCursor = db.query(DATABASE_TABLE,COLUMNS,KEY_NAME + " MATCH ?", new String[] { RName }, null, null, null);
return mCursor;

}

Prerna