Bonjour,
je débute avec l'utilisation de SQLite et j'essaye d'utiliser un cursor loader pour l'exploitation de ma BDD.
Pour une table nommée "TableLifetouchRespirationRate" j'aimerai récupérer tout les id des lignes ou la colonne est égale a faux.
Traduction SQL:
J'ai tente un truc comme ça:
Code : Sélectionner tout - Visualiser dans une fenêtre à part " SELECT id FROM TableLifetouchRespirationRate WHERE acknolegment_message = false "
Si besoin je peux vous fournir le code complet et le content provider.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 String[] projection = { TableLifetouchRespirationRate.COLUMN_ID, TableLifetouchRespirationRate.COLUMN_LIFETOUCH_ID, TableLifetouchRespirationRate.COLUMN_RESPIRATION_RATE, TableLifetouchRespirationRate.COLUMN_SESSION_NUMBER, TableLifetouchRespirationRate.COLUMN_TIMESTAMP, TableLifetouchRespirationRate.COLUMN_ACKNOWLEDGMENT_MESSAGE }; Context context = this; Uri uri = IsansysPatientGatewayContentProvider.CONTENT_URI_RESPIRATION_RATES; String selection = TableLifetouchRespirationRate.COLUMN_ACKNOWLEDGMENT_MESSAGE; String where = "Where = false"; String[] selectionArgs = {where}; String sortOrder = "ORDER BY _id"; cursorLoader = new CursorLoader(context, uri, projection, selection, selectionArgs, sortOrder);
Je n'ai pas trouve d'exemple concret pour l'utilisation de ce loader, je ne comprends pas vraiment le paramètre "selectionArgs".
Merci de votre aide
Partager