Questions tagged [android-sql]
30 questions
11
votes
5 answers
Android room database won't export all the data
I'm trying to setup Room database backup functionality.
Problem is that sql database file doesn't contain latest set of data in the app once downloaded. It always misses some most recent records.
Is there a proper way to export room database?…

Tuesday Four AM
- 1,186
- 1
- 11
- 18
2
votes
1 answer
Why columns with integer data type is also storing the float values in SQL data base
I made a SQL database using this statement
final String SQL_CREATE_PRIMARY_TABLE = "CREATE TABLE " +
TABLE_NAME + " (" +
P_K + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
SET_NAME + " TEXT, " +
MARKS_O1 +…

PRANAV SINGH
- 1,000
- 11
- 17
2
votes
2 answers
Couldn't read row 0, col 5 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it
Log Cat
Caused by: java.lang.IllegalStateException: Couldn't read row 0, col 5 from CursorWindow. Make sure the Cursor is initialized correctly before accessing data from it.
at android.database.CursorWindow.nativeGetString(Native…

Dark Shadow
- 23
- 1
- 6
1
vote
3 answers
SQLite GROUP BY preferring a certain value
I've been working on an Android application for a few years in my spare time, a companion app for Magic: the Gathering. I've been trying to figure out a way to include all of the different languages available but would like to only display unique…

Andrew Speers
- 13
- 2
1
vote
1 answer
sqLite database -next week, next Month query
I am kind of stuck in a place. I want to load data from my SQLite database in android by next week, next month, etc. But couldn't do it although I have tried last week and last month's query, which was working fine. It would be helpful if someone…

Sakhawat Hossain
- 454
- 8
- 23
1
vote
0 answers
GROUP BY query in SQL?
I am new to implementing sql in android I need to show a list after storing the data into my localdb below is my code snippet
private void getAllData() {
data.clear();
Cursor mCursr_all = SFMApp.localDBS.fetchMyPurchaseAllGroupBy(activity,…

Varun
- 79
- 6
1
vote
1 answer
Android SQLite is it today
This my Table codes
CREATE TABLE InformationTable"
+ "(ID INTEGER, "
+ " ConfirmDate TEXT , "
+" Counter INTEGER DEFAULT 99999"
+" )";
I want to a select query about InformationTable. I want to…

Muhammed Almaz
- 55
- 1
- 8
1
vote
4 answers
SQL Query for timestamp
I had following Table
CREATE TABLE Customer
( `Name` varchar(7), `Address` varchar(55), `City` varchar(15),`Contact` int,`timestamp` int)
;
INSERT INTO Customer
(`Name`,`Address`, `City`, `Contact`,`timestamp`)
VALUES
('Jack','New…

Lalit Jadiya
- 213
- 4
- 14
1
vote
1 answer
Declaring SQLite table for Android word game with 700 000 words
For an Android word game (with minSdkLevel=9 meaning SQLite version 3.6.22) -
I would like to deliver the dictionary as a prefilled SQLite table within the APK file (with the help of SQLiteAssetHelper).
In the SQLite database there will be just 1…

Alexander Farber
- 21,519
- 75
- 241
- 416
0
votes
2 answers
How to insert/update SQLite Database in Android?
I am using the SQLite database to save some information locally. I want to update the row with the same userID each time while saving new data for that particular userID. But it should insert the data to a new row with the new userID and insertion…

Malhotra
- 221
- 3
- 13
0
votes
1 answer
Android SQLite dynamically insert sorting (ASD or DESC), is it possible?
I'm trying to use one method for dao (Room) to get items by a specific sorting dynamically, but compiler gives an error for the next SQL query
So it's not possible? Do I have to create duplicate methods with different sorting?

user924
- 8,146
- 7
- 57
- 139
0
votes
3 answers
Android proper way to create a DatabaseAccess class
I have the following DatabaseAccess.java class which contains the following code in order to instance , open , close and some queries :
public class DatabaseAccess {
Context context;
private SQLiteOpenHelper openHelper;
private SQLiteDatabase…

Nexussim Lements
- 535
- 1
- 15
- 47
0
votes
1 answer
How can I apply formatting to some specific text in SQLite?
I am developing a small app. I used internal SQLite java class to store data. Data is successfully stored and displaying. I used card-view and recyclerview. All things are working fine. But I want to apply formatting on specif text, which is…

kinza Akbar
- 17
- 3
0
votes
2 answers
How to pass the data in the database to a spinner
I'm creating a method to read all the information in the database and view it through a spinner here is the code i tried for this function
public Spinner loadArtist(){
SQLiteDatabase DB = getReadableDatabase();
String[] projection…

Group Assignment
- 25
- 4
0
votes
2 answers
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 ERROR for Android
My Code is below. It is giving an error in Android Studio. Anyone please help me. My PHP code is OK but why is it giving this error?
Register.java
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import…

S.M. Tanver hossain
- 3
- 1
- 2