Questions tagged as 'sqlite'

1
answer

Filter by dates with rawQuery

I can not filter by end date on an SQLite. For this I have created a method which is passed 2 dates, one start and one end. private void consultListaDietas (Date di, Date df) { SQLiteDatabase db =conn.getReadableDatabase(); Dieta...
asked by 25.12.2018 / 13:44
2
answers

Python - Django error when creating super user

I am creating a student management service. Once I finish designing the models I make the migrations (makemigrations and migrate) of my apps, without problems. But when trying to create a super user, this error occurs: Nombre de usuario: Admin...
asked by 24.12.2018 / 18:43
1
answer

Error logging into the database: remove from the app

I have problems with my database, I try to login but it takes me out of the app. public class MainActivity extends AppCompatActivity { Button bt_Ingresar; Button bt_registrarse; EditText et_Nombre, et_Password; private Cursor...
asked by 25.12.2018 / 11:05
0
answers

Full text search with SQLite using prefixes and suffixes at the same time efficiently

I would like to know how I perform the following SQL query: SELECT * FROM libros WHERE titulo LIKE '%caball%' OR titulo LIKE '%pur%' OR titulo LIKE '%sangr%' OR ...; but using "Full Text Search" with SQLite and efficiently. I do not like...
asked by 15.12.2018 / 23:58
1
answer

Help with creating SQLITE3 tables

I have an error with the following query of my table in sqlite3: Create table EmpleadosCursos( Empleado constraint fk1_empleadoscursos references empleados, Curso constraint fk2_empleadoscursos references cursos, constraint pk_empleadoscursos...
asked by 10.12.2018 / 18:59
0
answers

android sqlite insert image

I have encountered a problem when inserting a photo which is loaded from a button, but, I'm going around and I do not have the clear idea, the code is this: import android.Manifest; import android.content.ContentValues; import android.content....
asked by 01.12.2018 / 22:47
1
answer

I do a query in a sqlite database with Flask Python and it returns none when there are rows to read

I leave the code @app.route("/") def getInicio(): conn=sqlite3.connect('datala.db') c = conn.cursor() row=c.execute('''SELECT * FROM servicio''') resultado =c.fetchone() print(resultado) conn.close() return "...
asked by 30.11.2018 / 12:59
0
answers

How can I create database in SD external storage

I would like to create the database directly in the file system directory where the internal files of my application are saved and access them with getFilesDir() . I am faced with the problem that when the database is created within the...
asked by 17.11.2018 / 19:12
0
answers

SQLite with SQL View and IS NULL

I have two tables: **Tabla 1** Mensajes con los campos cod_mensaje, cod_usuario, texto **Tabla2** Accesos cod_mensaje, cod_usuario In the access table, I record every time a user reads a record from the messages table. I have created a...
asked by 18.11.2018 / 10:37
1
answer

Android Studio delete item from Recycler View

I'm trying to delete items from a Recycler View, which I upload to a SQLite database. Selecting the "Delete" button deletes the record from the SQLite database, until it's all right, but it does not erase the element itself from the Recycler Vie...
asked by 25.11.2018 / 20:23