Respected Users,
I am new with android and SQLite technology.
I am getting error in following statement.
Kindly correct me.
Cursor mCur=
db.query(DATABASE_TABLE,
new String[]{ROWID,MEDICINE,KEY_DESC,PRICE},
MEDICINE+" = "+medName,null,null,null,null);
My Other question is that is there any event associated with EditText so that I can use its functionality as I was using it with text_change in C# .NET.
[When I types the text event should get fired].
For this I have tried with following events:
- setOnEditActionListener and
- setOnTouchListener
1) In your SQL query I assume your
medNamewas the problem because it is a String, use:This approach also protects you from SQL injection attacks.
2) To listen for changes in an EditText, use a
TextWatcher.