Questions tagged as 'sqlite'

1
answer

Open gallery, select and save address in database - Android

I wanted to know how I can open the gallery in my android application at runtime, select an image and copy that image to a folder of my application on the SD card and save the image path in the database, could someone help me ?     
asked by 23.09.2014 / 02:05
1
answer

Python: Tkinter + SQLITE. Save records to database and clear field

I'm studying, on my own, SQlite, I've already bought some courses, but I need some help. Purpose: I would like to save the user-entered fields in the database and then clear the same fields to allow new data entries. The program is a wind...
asked by 20.11.2018 / 13:25
1
answer

android.database.sqlite.SQLiteException: near "SQL": syntax error (code 1):, while compiling: SQL * FROM Employers WHERE id =?

I'm trying to make SELECT below passing a value as a parameter in the search, but it still gives the same error.    android.database.sqlite.SQLiteException: near "SQL": syntax error (code 1):, while compiling: SQL * FROM Employers WHER...
asked by 09.11.2018 / 07:32
1
answer

sqlite3.OperationalError: near "": syntax error

Do you know what this error means? Error: sqlite3.OperationalError: near “ ”: syntax error Code: def alterturma(self): bancoturmas = Bancoturmas() #try: c = bancoturmas.conexao.cursor() c.execute(...
asked by 05.08.2018 / 13:55
1
answer

Sqlite, check the exact difference between a date, time and minutes of the current date [duplicate]

I need to do a check between two dates, I need to check if the date, time and minutes of a field is greater than or equal to the current date, time and minutes, I am using SELECT * FROM info WHERE strfTime ('%s', dataFinal ) >= strfTime('...
asked by 18.07.2018 / 23:10
1
answer

Run sql file with SQLiteDatabase Android

I am implementing in an Activiy the download of an sql file from a web server. The Download I already managed to do and it is working without problems. However, catching this downloaded file and having it executed with the execSQL () command is...
asked by 26.04.2018 / 02:14
2
answers

Hide record for user

By "deleting" a precise record it hides it from a table in the user's view, but it must remain in the database. I put a field called ' status ' in the table that manages just that. In the view I put a ' if ' that performs the filter...
asked by 27.03.2018 / 20:13
1
answer

Find values between two dates in SQLIte

How can I find records on two dates in SQLite ? In mysql I know it's through BETWEEN , but I do not know how it does in SQLIte.     
asked by 29.03.2018 / 16:52
2
answers

Format year in SQLite

I need to format a timestamp in the following format: DDMMYYHHMMSS I was able to use strftime , for example: select strftime("%d%m%Y%H%M%S", current_timestamp) from stream; But this way it shows 4 digits for the year and I only need...
asked by 30.03.2018 / 21:00
1
answer

What is the use of using BaseColumns._ID to define a contract class in SQLite?

Why should I use BaseColumns._ID instead of simply setting a String to _id ? For example, instead of using: public static final String _ID = BaseColumns._ID; Would not it be simpler to use this? public static fina...
asked by 25.02.2018 / 21:08