Questions tagged as 'sqlite'

1
answer

Get data from SQLite DB without using ListView [closed]

My code needs to get the data from the database, in short it just needs the following commands: if (cursor.moveToNext()) { Contato contato = new Contato(); contato.setCodigo(cursor.getInt(cursor.getColumnIndex("ID"))); contato.set...
asked by 19.02.2014 / 23:16
2
answers

How to get record ID that is populated in ListView

How do I get the ListView ID? Here is my summarized code: UPDATE How do I get the LOG ID that is populated by SQLite in the ListView. public class MainActivity extends ActionBarActivity { private SQLiteDatabase database; privat...
asked by 04.02.2014 / 16:52
1
answer

How to use the AS operator with the Library Room?

I'm not able to retrieve the variable total , how do I? @Query("SELECT SUM(item_valor) AS total FROM Itens WHERE total =>:data") Itens getMes(String data); The IDE warns syntax error in the WHERE clause's total variable. My Enti...
asked by 05.05.2018 / 17:24
1
answer

SQLite recursive query

I'm trying to query a SQLite database, I have the following tables: Table suggestions: CREATE TABLE IF NOT EXISTS sugestoes ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, texto VARCHAR(250), autor VARCHAR(250...
asked by 29.05.2018 / 04:19
1
answer

Generate JSON from SQLite

I have a table with several records in SQLite , and also other data in SharedPreferences . I would like to generate a JSON by pulling those records, and together that SharedPreferences data. But in search, I barel...
asked by 23.02.2018 / 17:21
1
answer

How to get the number of users with less time in each clan?

I have 2 tables: CREATE TABLE 'deathrun_records' ( 'sid64' STRING, 'mapname' STRING, 'seconds' REAL ); CREATE TABLE 'clan_members' ( 'sid64' STRING, 'nome_clan' STRING, 'prop' STRING ); The first table saves th...
asked by 08.12.2017 / 12:53
1
answer

Insert SQLite using an array - PHP / Laravel

I have the following array : array:30 [▼ 0 => "12933" 1 => "12931" 2 => "12930" 3 => "12929" 4 => "12928" 5 => "12927" 6 => "12926" 7 => "12925" 8 => "12924" 9 => "12923" 10 => "1292...
asked by 15.11.2017 / 17:46
1
answer

How to view and maintain a SQLite database [closed]

Hello, I recently started to study the SQLite database and would like to know if there is a way to view my tables and the entire database structure, just like pgAdmin and MySQL Workbench. If at least via USB I can access and modify these bank...
asked by 15.11.2017 / 22:12
1
answer

SQLite Database is not entering values

I'm creating a simple application that involves the SQLite database and throughout the development my insert function in the table has stopped working. Through the debug I noticed that it is running to the end but the data is not being inserted....
asked by 20.11.2017 / 04:42
1
answer

Why does the connection pool close before displaying SQLite data?

I'm trying to display DB data in a Recycleview but I get the following error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.emerson.drawer, PID: 8316 java.lang.IllegalStateException: Cannot perform th...
asked by 23.03.2017 / 01:39