1

I porting to android platform from C sqlite3. It is code below.

    final String tsql =
            "select cA, cB from tA where cC=?1 and (cD & 255)=?2 order by cD";

    Cursor dbo = DB.db().rawQuery(tsql, new String[] {String.valueOf(101), String.valueOf(102)});
    try {
        if (dbo.moveToNext()) {
            res1 = dbo.getInt(0);
            res2 = dbo.getInt(1);
        }
    } finally {
        dbo.close();
    }

In result, Row set was not found.

"select cA, cB from tA where cC=?1 and (cD & 255)=?2 order by cD";

Above statement is NG, But the following is OK.

"select cA, cB from tA where cC=?1 and (cD & 255)=102 order by cD";

Why did you ? I want to do it in the way of parameter query. What should i do?

Sutezo
  • 11
  • 1

0 Answers0