Комментарии:
안녕하세요, 작업을 축하합니다. 나도 좋아 BRZ11990003036 🇧🇷
ОтветитьThe update function in DataBaseHelper Class is always returning true no matter data is updated or not, so it will always show data is updated.
ОтветитьFrom mid 2021 and you just saved my life MR!
THANK YOU!!!!!!!!!!!!!!!!!!!!
Any one can help I use complete method by seeing this video but my database is not created
ОтветитьData is not updating please help
ОтветитьThank you for the superb tutorial,, really really very helpful and easy way to understand.
ОтветитьI suggest function updateData like below, it returns integer.
public int updateData (String id, String name, String surname, String marks) {
db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(COL_1, id);
contentValues.put(COL_2, name);
contentValues.put(COL_3, surname);
contentValues.put(COL_4, marks);
String[] IDs = {id};
return db.update(TBL_NAME, contentValues,"ID = ?",IDs); // successfull return 1 else return 0
}
Then on the calling method
...
if (isUpdate == 1)
Toast.makeText(MainActivity.this, "Data updated.", Toast.LENGTH_LONG).show();
else
Toast.makeText(MainActivity.this, "ID not found.\nData not updated.", Toast.LENGTH_LONG).show();
So if update succesfull the function updateData will return 1 else 0.
bro ty so much!
ОтветитьIt says array dimension missing
Ответитьthank you very much .. cool stuff there , i have question that why did you pass only id in string[ ] , why not all(name , surname etc) ... i didn't get this
Ответитьcan u make videos on where query is applied for viewing data
Ответитьcan any reply plzzzzzz
Ответитьcan any give mw rply???
Ответитьis any one there to help me out ??
ОтветитьHai this is sainath can any one help me insert,Update and delete data in mssql database using android studio can any one reply me plzzz....
ОтветитьThanks for sharing your knowledge with us. May God bless you man.
Ответитьthis guy is sexy af :D
Ответитьman you are my hero.
ОтветитьThanks again!
ОтветитьHi parogrammingKnowledge thank you very much for your video tutorial.I was appreciate if you could make in video call and in SMS messaging application. thank you again.
ОтветитьThanks for this super clear tutorial
Ответитьjust one question, when I put an ID that is not on my table, even though it does not update it still sends me "Data Updated Successfully", what would be the reason of this?
Ответитьdata is not updating only showing toast message .....need help
ОтветитьI would like to display data on a list view rather than a message from string buffer. Could you please show me how ?
Ответитьthank you..sir..
very informative lecturing
So what happens if someone types in the wrong id?
ОтветитьHow would you be able to view all and tap the one you want to change or delete?
Ответитьrespected sir i have a request that sir the tutorial vidio are not so much clear pic we don't understand that what coding is done sir please give me some suggestion that what i do sir i well be very thinkful of you sir
ОтветитьCan U help me please with that... !!!
android.database.sqlite.SQLiteException: no such column: ID (code 1): , while compiling: UPDATE student_table SET ID=?,NAME=?,SURNAME=?,MARKS=? WHERE ID= ?
Hello! Thank you for this tutorial ... I need to update a single value on a specific row ... how could I do? Thanks!
Ответить@ProgrammingKnowledge can you tell me how to store image in SQLite Database
ОтветитьHi ProgrammingKnowledge, Thank you very much for amazing Tutorial. I was wondering, if you could make tutorial on bottom bar? I tried to look for tutorials, but some how they dont work when applied in my app, I will really appreciate it :)
Thank you :)
i got this error:
FATAL EXCEPTION: main
Process: com.example.jesusalvelo.sqlite, PID: 2438
android.database.sqlite.SQLiteException: near "fromstudent_table": syntax error (code 1): , while compiling: select * fromstudent_table
could it be this part?
public Cursor getAllData(){
SQLiteDatabase db = this.getWritableDatabase();
Cursor res = db.rawQuery("select * from"+TABLE_NAME,null);
return res;
}
Thank you so much
Ответитьupdate not successful but still give messege that updated successfully
ОтветитьAS 2.2.1 is so awesome and powerful that following source codes are given automatically:
public Cursor getAllData() {
SQLiteDatabase db = this.getWritableDatabase();
Cursor res = db.rawQuery("select * from "+TABLE_NAME,null);
return res;
}
public boolean updateData(String id,String name,String surname,String marks) {
SQLiteDatabase db = this.getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put(COL_1,id);
contentValues.put(COL_2,name);
contentValues.put(COL_3,surname);
contentValues.put(COL_4,marks);
db.update(TABLE_NAME, contentValues, "ID = ?",new String[] { id });
return true;
Tutoria code backup name, Surname & marks in updaite SQLite
ОтветитьTutoria backup name, Surname & marks in updaite
ОтветитьTutoria backup name, Surname & marks in updaite
ОтветитьYou are really good, please come up with more advance concepts like android Material Design and motions
Ответитьthanks for your gud tutorials on sqlite ....ts awesome
ОтветитьMy emulator does not start and neither my mobile is root so i cant see the table. Is there another way to see the table? Please help me.
ОтветитьThis is not the best way to do an update because the id is automatically assigned ,you can't assign an Id yourself which makes the app limited
ОтветитьDATA IS ALWAYS UPDATED AND NEVER SAYS "Data is NOT updated"
ОтветитьPlease Reply to this I want to add new values to existing value what should i do. Like if my db have 10 value in marks column and if i want to add 20 in it and want to update in that way what should i do. My application is almost ready just waiting for this issue. Please reply asap. And thanks for your videos .:)
Ответитьgood video, but bad programming concept for real life example. entering id manually is not good practice shuld be automatically done, anyways good video.
ОтветитьIt says Data is updated , but it is not :(
Ответитьthanks.. tutorials are awesome to start with.
Please provide the link for source codes as well