Questions tagged as 'sqlite3'

2
answers

How to instantiate a class of type SQLiteOpenHelper in another simple class

I have two classes one of type SQLiteOpenHelper and another normal one public class dbdata extends SQLiteOpenHelper{} and another public class parsers {} The Parsers class, reads a json, and I want it to read when I save to the sqlite...
asked by 26.04.2017 / 22:12
1
answer

How to Insert Date in SQLite

I have a query: I have a table in SQLite with this structure CREATE TABLE [Agenda] ( [Itinerario] VARCHAR(50) NULL, [Creado] TIMESTAMP NULL, [Fecha] TIMESTAMP NULL ) And I'm trying to enter rows with the following SQL statement:...
asked by 23.08.2016 / 19:01
2
answers

Show in Log the data with which you are filling a cursor in android

I have a cursor that I'm filling from the SQLite database, but apparently it's empty, I want to show it in the console using a log. cursor=db.obtenerSaldoClienteFavor(idClienteA); This is my cursor, thank you very much     
asked by 03.01.2019 / 21:44
1
answer

How can I pass the value of a variable to the update function of sqlite3 in python

I would like to know how to pass data to the update function of sqlite 3: this is the code: conexion = sqlite3.connect("Db/Users.db") cursor = conexion.cursor() intem = self.lineEdit.text() cursor.execute('UPDATE Usuarios SET Contraseña ='...
asked by 27.07.2018 / 20:53
1
answer

Data entered using form made in tkinter are not inserted in the database

I have a Python code with Tkinter where the user must enter their email, password and a destination email. Later this data must be recorded in a database sqlite, but I can not record the data ever. My code is as follows: #!/usr/bin/python #...
asked by 28.04.2018 / 06:03
2
answers

Unable to delete Sqlite table

I want to make sure to delete a table (if it exists) before creating another table with the same name. But this does not happen, I realize because I make changes in the code and command to compile and execute, and I only notice the changes (whic...
asked by 28.05.2016 / 21:26
0
answers

CTE with subqueries in anchor and recursive call

It turns out that I have these three tables, Users(id, name) Colleagues(id1, id2) Friends(id1, id2) I need to write a query that gives me pairs of ids so that one can "get" from id1 to id2 with an arbitrary numbe...
asked by 29.06.2018 / 22:48
0
answers

You can change the NEW value in a BEFORE UPDATE in SQLite base

This is the code I want to implement but it gives me errors: 1 CREATE TRIGGER tg_b_u_table1 2 BEFORE UPDATE ON table1 3 FOR EACH ROW 4 BEGIN 5 :NEW.dato_int := 5; 6 END; Mark line 5 in red     
asked by 14.04.2018 / 18:19
0
answers

Error migrating from SQLite3 to PostGreSQL: No operator matches the given name and argument type (s). You might need to add explicit type casts

SELECT ag.user_id, ag.user_des, ag.user_login, ag.user_pwd, ag.act_readers, ag.h_reader, ag.email, ag.phone, ag.workgroup, ag.suspended, ag.accesstype, ag.firekey, cli.tpdoc FROM agenda ag INNER JOIN Cliente cli ON ag.user_id = cli.doc...
asked by 19.04.2018 / 16:50
0
answers

Show values with sqlite3 and python

I am making the query to be able to show within a lineedit the respective values to the columns of the database this is my interface: and this is the query I try to execute: tx = self.l_usuario.text() cursor.execute("SELECT Usuario,Co...
asked by 28.07.2018 / 20:29