8,271 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 $...
1
vote
1
answer
58
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....
2
votes
2
answers
99
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
72
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
27
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 ...
2
votes
2
answers
53
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 = ...
0
votes
0
answers
66
views
Room migration fails even when I specify default value using @ColumnInfo
I have this entity and today I added one more field at the bottom: isClient: Boolean
@Entity(tableName = "user")
data class UserDataEntity(
@PrimaryKey
val id: String,
val ...
0
votes
1
answer
104
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 ...
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 ...
3
votes
1
answer
153
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 ...
2
votes
1
answer
585
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....
2
votes
2
answers
7k
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
2
answers
200
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 ...
3
votes
0
answers
585
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
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
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 ...
0
votes
1
answer
150
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 ...
1
vote
1
answer
119
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.
...
0
votes
0
answers
36
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 = ...
3
votes
0
answers
36
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
99
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
0
answers
24
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
votes
1
answer
99
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 ...
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() ...
1
vote
0
answers
113
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() {
...