I have been trying to debug this for hours now and I am at a complete dead end. I am creating a program where you enter the current date and your current weight into a screen in Android Studio then click submit. That date gets sent to an SQLite database with two columns for data – “date” and “weight”. There
Tag: sqlite
Cursor should only select cells with a different value
I want, that my cursor is moving to the next cell with different content and I want the cursor to skip over all cells that have a value that already existed. For example we have the column: Beer, Car, Car, House, Beer, Tree (in KEY_AREA) The cursor should select: Beer, Car, House, Tree and skip 1 Car and 1 Beer.
Android intent returning null when moving back and forth of activities
I have an app where a user can create/login an account, when the user logs in, I pass their valid email as an intent to the main/landing activity . I also have another activity for the user profile, from which I pass the intent from the landing activity (the user email). With the user email I created queries to get
How to automatically update ListView with custom adapter when item is deleted from database
I created a ListView for which I implemented a custom adapter. Additionally I connected it to a SQLite database, which contains the content for the ListView. I have one ListView with several items. Every item consists of a TextView and an ImageView which functions as a button. When the user clicks the ImageView, I want to delete the item from
near “”: syntax error in SQL with android studio
I’m working on a SQL databse on java (android studio project) but i have a weird mistake. Basically, everytime i have I have tried like this My DBS is And i really don’t see where is the mistake. Because they’re saying “syntax error”, but for me, it’s look pretty OKAY. Anyone have a clue ? I’m just trying to insert
How to prevent saving empty data in SQLite database
I dont want to save empty data in my Note App. I have tried Everything but when I leave Edittexts empty it still saves data into my data base. what should I do? this is my insertNote method and this is the method that saves my notes in my AddNoteActivity i have also tried this but this is but this
How to get row cursor with primary key android
I have a table with the following I am trying to get all the data at a given rowid I get an error I did populate the table. How do I return a cursor based on the position of entry. Answer How do I return a cursor based on the position of entry First, your method getRowCursor() should return a
I can’t create sqlite multiple tables android where did my code go wrong?
I want to create a 2 sqlite table but second table can’t be created just frist table was created. I don’t know where code go wrong. this is my code to create Answer I already solved it!,i just reinstall app
How can I store data with nested object data in Android? [Room]
I have a high dimensional dataset that it provides with a json structure (about 3000 objects, an array of each object and dozens of objects in that array.) I read them with the help of the volley library. I want to save this data. in the database and access it easily. how can I do it I couldn’t find examples
How can i pass values from sqlite database to viewpager?
There is my model. (Card with two questions) This is my Activity. Adapter pass values from ArrayList to the ViewPager. In this class I create DataBase and try to pass values from cursor to ArrayList in MainActivity, but, when I start to debug, the debugger shows me that ArrayList in MainActivity is not filled with values. What I should do