Try this:
Cursor cr = db.rawQuery("SELECT _id FROM t1 WHERE creation_date = ?
",
new String[]{"\"1-2-2011\""});
I've found that when working with strings you have to include a quote
around the string which your statement does not include.
On Feb 28, 9:37 am, Monzurul Islam Shamim <[email protected]> wrote:
> Hi,
>
> Can anyone tell what is wrong in following query,
>
> Cursor cr = db.rawQuery("SELECT _id FROM t1 WHERE creation_date = ? ",
> new String[]{"1-2-2011"});
>
> It always returns empty result. Even though in 't1' table there are
> data for 'creation_date=1-2-2011'.
>
> -Shamim
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en