Hi all,
The problem come from the construction of the sql query retrieving
people,
there is a ambiguity on column name: _id.
I solve the problem using "people." + People._ID. It's a _dirty_
solution
but can't get the table name in a class property (or don't know
how ;)).
The query used by the SDK to get people is :
SELECT COUNT(*) FROM (SELECT people._id AS _id, name, number, ...
FROM people LEFT OUTER JOIN phones ON
people.preferred_phone=phones._id
LEFT OUTER JOIN presence ON (presence.person=people._id)
WHERE "what you want but if a condition is on '_id' sqlite3 will don't
know if you talk about 'people._id' or 'presence._id'"
The use of a view to retrieve peoples in the content provider should
probably solve this ambiguity problem.
What do you think about this ?
Thanks all.
--
Praline.
On Mar 17, 2:34 pm, Praline <[EMAIL PROTECTED]> wrote:
> Sorry, sql code used isn't "IN {...}" but "IN (...)".
>
> So this code return null instead of a cursor :
> getContentResolver().query(People.CONTENT_URI, null, People._ID + " IN
> (3,4,5)", null, null);
>
> Best Regards,
> Praline
>
> On 17 mar, 09:07, Praline <[EMAIL PROTECTED]> wrote:
>
> > Hello all,
>
> > I try to get a set of contacts with this code and it doesn't works:
> > getContentResolver().query(People.CONTENT_URI, null, People._ID + " IN
> > {3,4,5}", null, null);
>
> > Anybody has an idea?
>
> > Best Regards,
> > Praline.
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---