Bind value at index 1 is null in query?

android, sqlite

Solution

Make sure the values "one" and "two" are not NULL. I believe that error means that one of those values is null.

Problem

I am getting "Bind value at index 1 is null" on the following query: ``` public String searchForWifiSSID(String one, String two){ c = db.query(Constants.TABLE_NAME, new String[]{Constants.PARAM1, Constants.PARAM2}, Constants.PARAM1 + " =? " +" AND " + Constants.PARAM2 + " =? ", new String[]{one,two}, null, null, null); } ``` Is my syntax for selectionArgs incorrect? Is it incorrect to just do: ``` public String searchForWifiSSID(String one, String two){ c = db.query(Constants.TABLE_NAME, new String[]{Constants.PARAM1, Constants.PARAM2}, Constants.PARAM1 + " = " + one +" AND " + Constants.PARAM2 + " = " + two, null, null, null, null); } ```

Original source