I'm using the program found on this programming blog for using pre-populated sqlite table. I am trying to insert any row in the table but it is giving always SQLException:
Problems executing Android query: SELECT * FROM `user` WHERE `username`='Shadow'
This is the method where I'm getting this error:
public User getByUsername(String username) {
try {
QueryBuilder<User, String> qb = userDao.queryBuilder();
qb.where().eq("username", username);
PreparedQuery<User> pq = qb.prepare();
return userDao.queryForFirst(pq);
} catch (SQLException e) {
e.printStackTrace();
return null;
}
}
Looking for help...