I\'m tryin to retrieve only one row from the data base so iuse the query method and i write this code but i have the following error: no such column, please who know how correct this code or please tell me how retrieve data with select ... from where....
note I use the m5 version of sdk
thinks a lot
Using java Syntax Highlighting
- public Cursor fetchAccount2(String user) throws SQLException {
- Cursor result = mDb.query(true, DATABASE_TABLE, new String[] { KEY_ROWID, KEY_ACCOUNT, KEY_USER, KEY_PASSWORD, KEY_SMTPHOST, KEY_SMTPPORT, KEY_POPHOST, KEY_POPPORT}, KEY_USER + \"=user\", null, null, null, null);
- if ((result.count() == 0) || !result.first()) {
- throw new SQLException(\"No user matching : \" + user);
- }
- return result;
- }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


