8,270 questions
0
votes
0
answers
28
views
SQLite ALTER TABLE RENAME COLUMN not working on Android 10 device using SQLiteOpenHelper [duplicate]
I am trying to rename a column in an SQLite database (SQLiteOpenHelper) in my Android app. The code I am using is:
db.execSQL(
"ALTER TABLE $MY_TABLE_NAME RENAME COLUMN $OLD_COLUMN TO $...
0
votes
0
answers
43
views
React Native SQLite: Inserted data not showing correctly / not saving as expected
import { View, TextInput, Text, Pressable, StyleSheet } from 'react-native';
import { useEffect, useState } from 'react';
import Ionicons from 'react-native-vector-icons/Ionicons';
import initDB from '...
1
vote
1
answer
59
views
Android db not in /data/user/0/com.programName
I am trying to locate the database created by the following code on my Android device,
public class DBAdapter extends SQLiteOpenHelper {
public DBAdapter(Context context, String name, SQLiteDatabase....
0
votes
1
answer
87
views
Android Room - Cannot run invalidation tracker. Is the db closed?
I'm trying to migrate data from an old SQLite database into my Room database at the time of creation. The old database was created by greenDao, and I want to import its data into a new Room-managed ...
2
votes
2
answers
104
views
SQLiteOpenHelper database approach with manually copying suitable for Android deployment?
I have an android java app that uses a SQLite internal database with a database that is located in the asset folder. So I "manually" copy the database in the constructor. My question is, if ...
0
votes
0
answers
31
views
How to efficiently switch SQLite databases in Android based on city selection?
I'm working on an Android app where users can select a city, and based on that, the app downloads a ZIP file containing a prebuilt SQLite database specific to that city. After downloading and ...
0
votes
0
answers
77
views
SQLiteDatabaseLockedException crash on WorkManager
We've recently encountered this crash but haven't been able to identify the root cause, as the error appears to be coming from WorkManager.
Workmanager version: androidx.work:work-runtime-ktx:2.7.0
...
0
votes
0
answers
23
views
fast sqlite3 query running slowly under android
I have an SQLite3 query which I have optimized to run very fast on a large data set (>20M records).
The actual query looks like this:
SELECT ROUND(F1, 4) AS F1, ROUND(F2, 4) AS F2
FROM (
SELECT ...
0
votes
0
answers
28
views
Android - Export SQLite data to CSV with accents
I am trying to export date in my android app from SQLite database to CSV. But the data in database contains accents (diacritics) as they are in slovak language.
My export already works, but when I ...
0
votes
1
answer
154
views
DLLNotFoundException (e_)sqlite3
I'm exporting an Android game from Godot 4.4dev3 with SQLite and having issues getting it to work. It works on desktop. It always results in a DllNotFound error. I am only targetting arm64-v8a on the ...
2
votes
2
answers
60
views
How do I locate the SQLIte database on Android
I tried the following code but it does not appear to work.
public DataBase(Context context) {
super(context, getDatabasePath(context), null, DATABASE_VERSION);
this.context = ...
1
vote
1
answer
136
views
How to migrate a Room database when a column has to get added to an @Fts4 entity?
I am using Room (version 2.6.1) with a @Fts4 annotated @Entity to support full text search (which works perfectly well).
This is my entity and this is the version that Room automatically created to ...
0
votes
1
answer
131
views
Two identical SQLiteExceprion in one line
I have two identical errors in one line using SQLCipher.
I am checking the password for correctness. If the parameter is entered incorrectly, two exceptions occur.
I looked at this page to see if the ...
0
votes
1
answer
112
views
Unable to copy or move file from databases folder with RNFS in react native
I have my database created at /data/data/<app_packagename>/databases/dbfile by react-native-sqlite-storage
i can see this file with Android Studio device explorer and the db works fine
i need ...
1
vote
2
answers
154
views
I need to keep data on the device with Jetpack compose multiplatform [closed]
I am developing an application that will work for both desktop and android with Jetpack compose multiplatform. I am new to multiplatform, I was an android developer before, but I did not need to save ...
0
votes
1
answer
1k
views
How to enable SQLite3 cli to load an extension
I have downloaded the extension I want in sqlite3 which is spellfix and when I open sqlite3 to enable it the cli is not able to recognize the sqlite function
Not sure how to load the extension ...
0
votes
0
answers
28
views
SQLITE Database Initialization Issue - Android
App developer noob here. I'm trying to build a simple .NET MAUI app using VS 2022 that has a SQLITE database as an embedded resource. I'm using the sqlite-net-pcl package.
I have a repository called ...
3
votes
1
answer
169
views
Android Room database only returns first 5000 characters of text field
I'm trying to retrieve a long string saved in my Room database table. But I'm observing that the DAO query only returns the first 5,000 characters of that string.
I can see the full 11,000 characters ...
1
vote
1
answer
104
views
SQL query to fetch data from three tables
I don't know SQL much, so I need help. I have three tables RoomTrains, RoomSchedule, and RoomStations in SQLite. I want to fetch data from these three tables.
RoomTrains
RoomSchedule
RoomStations
I ...
2
votes
1
answer
604
views
Cannot connect to SQLLite in MAUI (.NET 8)
I have an app created in maui (.NET 7). Now I tried to update to .NET 8 and updated ALL NuGet packages.
From now, I'm unable to open connection to SQLLite internal DB
public const SQLite....
0
votes
1
answer
153
views
Expo-sqlite syntax error on older android versions for correctly formatted errors for UPSERTS
For older versions of android < 10, upserts do not seem to be working. I am trying to run a simple upsert and constantly getting this syntax error when it gets converted into SQL: near "ON&...
2
votes
2
answers
8k
views
SQLite.openDatabase('dbname') is not a function in expo react native
Here's my coding
import * as SQLite from 'expo-sqlite';
const db = SQLite.openDatabase('myDatabase.db');
db.transaction((tx) => {
tx.executeSql(
'CREATE TABLE IF NOT EXISTS users (id ...
0
votes
1
answer
98
views
Data Retrieving In Android Not Working Properly
I am working on a streak counter functionality, the streak counting logic is working fine, but the data for last login date and last streak is not being fetched proplerly. What could be the possible ...
0
votes
2
answers
202
views
Room: How to perform query based on composite primary keys?
Is querying using composite primary key possible with Room?
@Entity(
tableName = "market_cap",
primaryKeys = ["assetId", "timestamp"]
)
data class ...
0
votes
2
answers
621
views
SQLite Exception on .net MAUI : no such table: matches
I'm trying to create a counter for a card game, and I'm trying to store the "Matches" with the points on a Database. I have installed the nuget package sqlite-net-pcl, and I'm getting the ...
3
votes
0
answers
602
views
how to embed Sqlite database with Maui app
This is part question part answer. Ive spent several days trying to find answer to this problem. Using VS2022 maui targetting androidn and ios. This problem seems to appertain to Android though I ...
0
votes
2
answers
222
views
ngageoint/geopackage-android Writing in GPKG from android
I have a project where i have to export coordinates data into a GPKG with media as blob from my app, so it can be opened in QGIS.
I have no experience at all in this field and have been battling for ...
0
votes
1
answer
115
views
Why does android app crash with SQLiteDiskIOException after update app?
After my app release, the following crash occurred.
Fatal Exception: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 1802 SQLITE_IOERR_FSTAT[1802]): , while compiling: PRAGMA ...
0
votes
2
answers
43
views
Explicit intent not working with forget password button also unable to read data from DB during sign in
In this app the login screen has 3 buttons forget password, sign in and sign up the explicit intent for sign up is working properly but for forget password it force closes the app
LoginPage.java
...
0
votes
1
answer
27
views
null object reference with intent,parcelable and getting data sqlite. Everythink is coded in onCreate in the different layout [duplicate]
I have a null object reference but object exist.
My model
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String ...
-1
votes
1
answer
48
views
how to insert data from edit text to sqlite db in android application
I am currently working on an android application where i have to register new users into sqlite db and users enter their details into editText and we need to fectch entered data and store it in db
the ...
0
votes
1
answer
156
views
SQlite for Android not working with json_group_array/json_object
Hey all I am trying to get this SQlite query to work in my Android app but for some reason its giving me the error of:
no such function: json_object (code 1): , while compiling
But it works in my DB ...
0
votes
1
answer
55
views
SQLite query not returning expected results despite correct hashing and comparison in Android application
I'm facing an issue with comparing a hashed email value stored as a BLOB in an SQLite database with a hash generated from an email address in my Android application. Here's a simplified version of my ...
1
vote
1
answer
125
views
How to delete SQLite database table in android java
I am using the following code for deleting SQLite database table. Apparently, there is a message that the table has been deleted, but when the app is run again, the table is shown again.
...
1
vote
1
answer
48
views
The table in the database (SQLite) is not created in the oncreate method
I am developing a mobile application in Android Studio. I have a "BreakfastDatabaseHelper" class for an SQLite database. Initially, I created the "breakfast" and "...
0
votes
0
answers
51
views
Android SQL database backup file format to cloud
In my Android app I have a SQL database. The user adds some data in app and he is able to backup the db to Google drive.
This works fine, I am doing it like this example:
String Path = ...
-1
votes
1
answer
84
views
Creating database file in application data
I read similar questions and answers, but none working for me.
I am trying copying sqlite database from assets folder to application data folder, but this always fail, because target database file is ...
3
votes
0
answers
40
views
Android SQLite data availability in multiusers-aware applications
Consider an application is not a singleton (android:singleUser=”false”) in android device and it has stored certain information in the SQLite DB under a particular user. When the user switch happens ...
0
votes
1
answer
41
views
Android Studio rawQuery with LIKE
This is my code but no results
String sqlQuery = "WITH Ranked AS (SELECT *, ROW_NUMBER() OVER(PARTITION BY " +
COLUMN_NAME + " ORDER BY " + COLUMN_NAME + &...
0
votes
1
answer
106
views
Sqlite (Android) : How to use object as attribute in another object?
I have a class, "Course", which I recently changed to consolidate some attributes into another class, "Assessment". The attributes for Course now include "public Assessment OA&...
1
vote
2
answers
44
views
My app on Android studio crash after I create the first data
If I dont have any type (the object) in my db then the app run normally, but after I add the fist thing to the db it crash right away and if i run it againt it still crash.
I don't know what to do. Is ...
1
vote
0
answers
27
views
Populating a spinner with data obtained from a spinner in a different activity
how do I populate a spinner to depend on spinner data in a different activity?In android studio using java and also with sqlite db.
I already have both spinners but I am struggling to make the second ...
1
vote
1
answer
83
views
Handling nested entities in Room database
I have these Entities I would like to insert in the database:
It seems I can't get to build the nested entities right. I need your help in this
[1] ArticleEntity
@Entity(
tableName = "articles&...
-1
votes
1
answer
109
views
java code sqlite database not being created in android studio
`Hello so i'm a noobie coder and im trying to code this mobile app on android studio that tracks ur current location and then sends it over to sqlite database when the "start journey" button ...
1
vote
1
answer
99
views
Export Sqlite database and Import after reinstall
I'm trying to export my SQLite database in order to import it as a backup after reinstall, but every time the export success, but when I want to import the file after I reinstall the app, It doesn't ...
0
votes
1
answer
75
views
Android - Error says: None of the following functions can be called with the arguments supplied: Toast.maketest() function in DataBaseHelper class
I was implementing a Toast method in the DatabaseHandler.kt class in android but the error came out that None of the functions can be called with the arguments supplied that is the Toast.makeTest() ...
0
votes
1
answer
36
views
app crushing using a CursorAdapter Sunclass
The app crashes when i click on the item that should get me to this listview activity, I have NO idea what it is that I'm doing wrong or what I need to do to correct it. here is my CursorAdapter ...
1
vote
0
answers
119
views
Mocking Room database in kotlin for android testcase throws error
I am trying to write testcase for room database in kotlin for Android.
With below implementation, error occurs
DummyDatabase.kt
internal abstract class DummyDatabase : RoomDatabase() {
...
1
vote
2
answers
43
views
Android SQLite search exact string
In my SQLite DB Table I have rows with column month. The column might contain one month only, but also multiple months separated by asterisk.
E.g.
1st row MONTH: 1*
2nd: 3*4*9*
3rd: 12*
4th: 2*5*
...
1
vote
2
answers
976
views
Android Event:APP_SCOUT_HANG Warning SQLite
In Adroid I am using retrofit2 call to my server to obtain data.
In onResponse after checking the version in DB I am dropping and recreating tables in DB and then inserting data. Everything works fine,...