Questions tagged as 'sqlite'

2
answers

Save images on sqlite android

Hello, I am trying an example to save photos in sqlite, I have managed to show an image of the gallery, but I do not know how to save it. Thanks. //cargar foto en imagenView @Override protected void onActivityResult(int requestCode, int result...
asked by 30.05.2017 / 13:22
1
answer

FATAL EXCEPTION: main ... Load SQLite query to arrayList and pass it to Recyclerview

Hi, I have a project in Android and what I need is to pass the data of a cursor, that is, a query to an arraylist, and then pass that array to another to "map" each column of the cursor in a class to show the data in a recyclerview. I really hop...
asked by 31.08.2018 / 20:04
1
answer

SQLite3 does not fail to insert nonexistent reference

I am working against a database in SQLite3 and I was surprised to be able to insert a line with a reference to another table in which the corresponding row with the foreign key does not exist. The following minimum example illustrates the sit...
asked by 07.01.2016 / 09:17
1
answer

How to copy a Sqlite database or file from internal storage to external storage?

How to copy a file or database from internal to external storage, sometimes we need to read files inside the internal storage ( data/data ), which is only possible if the device has root permission. In the case of a device that do...
asked by 15.06.2017 / 22:33
3
answers

problems with inserting records in Android

I have a problem entering usuario and password , by console it throws the following:    table users have 3 columns but 2 values were supplied and in the emulator the app stops, the table was created with two fields and an id...
asked by 13.11.2016 / 17:59
3
answers

Bring information from one activity to another

My project consists of a student agenda which can have different users per device, I want to take the ID of who enters (in the login ) and pass it to my second activity ( navigation drawer ) and with this to replace the title generat...
asked by 18.01.2017 / 05:40
1
answer

Verify BD existence and table on Android

How can I verify the existence of a table in the bd sqlite in an Android app? SQLiteDatabase database = SQLiteDatabase.openDatabase(ruta_base_de_datos, null, SQLiteDatabase.OPEN_READONLY);     
asked by 02.05.2017 / 15:59
2
answers

SQLite how to order from highest to lowest?

I would like to know how I can do a ORDER BY or order the query ascendingly, this is the code I tried but it sends me an error that the application has stopped. public Cursor readData() { String[] allColumns = new String[] { Databas...
asked by 02.02.2016 / 14:59
4
answers

Problem when relating 4 tables with left join

I have a problem with SQL. I want to make the list of 4 tables (user, appuserFuncitonRelation, organizations, GroupCommerce) where the organization is related to groupCOmmerce and appuserFunctionRelation is related to both and the other has the...
asked by 27.03.2018 / 14:23
1
answer

Can I save the BD SQLite in android in another route instead of / Data / ...?

I would like to save the BD of my mobile application in another folder that was not the normal path of / data / .., for example in the sdcard in a route that I can specify.     
asked by 26.10.2016 / 02:43