As ContentProviders can use internally database,Is there anyway to check particular table exists or not using content provider URI.
Any related links/code helps me a lot.
Thanks in Advance.
As ContentProviders can use internally database,Is there anyway to check particular table exists or not using content provider URI.
Any related links/code helps me a lot.
Thanks in Advance.
SQL query for checking if a table exists and doing operations:
IF
(EXISTS
(SELECT * FROM TABLE_NAME)
)
BEGIN
--Do Stuff
END
Use this query in a cursor and iterate:
Cursor cursor = contentResolver.query( "Your query here" )
For more info: