samedi 21 novembre 2015

SQLITE_CHEMA syntax error

The select statment seems ok to me, I do not know whats wrong with SQLite.

String prepared = "SELECT us.id, us.username, us.nombre, us.website, us.imagen-url, COUNT(s.id_siguiendo) as nseg"
    + "FROM USUARIO us, SIGUE s "
    + "WHERE us.username = ? AND us.password = ? "
    + "AND s.id_siguiendo = us.id_user";
c = Utils.getDBConnection();
prepStmt = c.prepareStatement(prepared);
prepStmt.setString(1, username);
prepStmt.setString(2, pwdHash);

prepStmt.setQueryTimeout(ServerConstants.SQLITE_QUERY_TIMEOUT_SECONDS);
ResultSet rs = prepStmt.executeQuery();

This return a exception with this message:

[SQLITE_SCHEMA]  The database schema changed (near 'USUARIO': syntax error)

Aucun commentaire:

Enregistrer un commentaire