Questions tagged [sqflite]

Use this tag for questions about the plugin for flutter named sqflite - which enables storage, retrieval, and manipulation of SQLite databases via flutter code.

sqflite is an plugin for . Supports both and .

Package documentation: sqflite

902 questions
-1
votes
1 answer

How to synchronize to match data from the mysql database with the internal sqflite database?

I'm new to flutter. I want to sync local sqflite database from external mysql database. What is the best way
Ghaith Alaji
  • 1
  • 1
  • 2
-1
votes
1 answer

Im facing this error when adding new data to sqlite in flutter

Exception has occurred. SqfliteDatabaseException (DatabaseException(2 values for 3 columns (code 1 SQLITE_ERROR): , while compiling: INSERT INTO contact ( title, deskripsi, date ) VALUES (?,?)) sql 'INSERT INTO…
Dzaky Fawwaz
  • 19
  • 1
  • 2
-1
votes
1 answer

Can any body able to see offline sqlite db data from apk using android studio in flutter?

I want to create an flutter app that will work offline. I have stored data in an SQLite database using SQLite plugin. Is it possible to access SQLite db data offline, from an APK using Flutter in Android Studio?
-1
votes
3 answers

SQLite/ SQFlite updating is not working in a Flutter app

I am building an application using Flutter and Dart programming language. I am using SQLite as the local database. Now I am developing a feature where I pass the data to a new form page when one of the items of the ListView is tapped. But updating…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
-1
votes
1 answer

SQLite fails for insert for json generated via json_serializable

I am trying to understand why the following exception is occurring on DB insert and how to do this correctly. ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: DatabaseException(java.util.HashMap cannot be cast to java.lang.Integer)…
bboursaw73
  • 1,128
  • 2
  • 13
  • 26
-1
votes
1 answer

BETWEEN query to return last 2 days records

Error : Unhandled Exception: DatabaseException(unrecognized token: "'1582268587562" (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM my_table WHERE date BETWEEN '1582095787562' AND '1582268587562) sql 'SELECT * FROM my_table WHERE date…
Jason Lloyd
  • 378
  • 7
  • 23
-2
votes
1 answer

Continuous increase in database id sqlite

This is how I create a database. CREATE TABLE $_tableName( id INTEGER NOT NULL PRIMARY KEY, category TEXT, content TEXT, date TEXT ) When I delete any data, id continues from where it left off. For example, I…
Semih Yilmaz
  • 437
  • 1
  • 4
  • 16
-2
votes
1 answer

Run Database At Android network

I have 4 Android devices, i want to make One device as Database* Server, and Other Devices as Clients connecting to the database On server. Note : any database possible. thanks.
-2
votes
1 answer

SQLite - add a column if it does not exist

I am new to SQLite. I want to add a column if it does not exist. How to check if the column name exists and then add if it does not? I tried ALTER TABLE table ADD COLUMN colname INTEGER ON CONFLICT IGNORE But it shows an error Result: near "ON":…
Rahul
  • 1
  • 3
-2
votes
2 answers

flutter with Sqflite : The return type 'Null' isn't a 'Future<_>', as required by the closure's context

I have a problem function of Inserted => The return type 'Null' isn't a 'Future<_>', as required by the closure's context
oulamin
  • 21
  • 3
-2
votes
1 answer

Delete rows using NOT IN

How can I do a delete in flutter using NOT IN() ? I have tried few ways but the app is always crashing : either it's closing the app with zero error or message : ** await db.rawDelete('DELETE FROM ' + dao.tableName + ' WHERE ' + …
Jérôme
  • 403
  • 1
  • 3
  • 13
-2
votes
2 answers

Return value of db.insert in sqflite?

Insert function on database in sqflite returns id of row inserted. But I want to know what it returns if an error occurs after getting an error during insertion. Thanks in advance.
-2
votes
1 answer

How to make and relate complex table with each other in sqfllite flutter?

I am using sqflite package to store data offline as well once it got from API. I had seen a couple of examples and all used the simple Strings and not lists in their models as a type and due to that I am feeling difficulty in the conversion of these…
Umair
  • 1,759
  • 6
  • 23
  • 44
-2
votes
1 answer

how can i run this code? every time i try i get error saying cannot be run without async?

I am unsure how I can use this code- every time i try to run it i get many errors. var databasesPath = await getDatabasesPath(); var path = join(databasesPath, "demo_always_copy_asset_example.db"); // delete existing if any await…
yas uo
  • 1
  • 3
1 2 3
59
60