How to update/edit data using Visual C# Update the data in a database C# edit data in mysql database Visual C# Update a MySQL database field data with C# …
Original source
How to update/edit data using Visual C# Update the data in a database C# edit data in mysql database Visual C# Update a MySQL database field data with C# …
Original source
22 responses to “C# Tutorial 7: Edit/Update a data from Database with button”
thanks mate – 4 years later and this video is still helping people
Suppose I left the last name textbox blank. Then what will be new value in database? The last value or surname will be updated to blank ?
can someone please help with this sql i want the user to update his profile. i create a profile page now i cant get the sql correct for the upadte button. i tried
update user (table)
set firstname,lastname,address,email,telephone (fields in my table)
where 'email' (email it uses to update that particular user account details
stop moving your f mouse
Thanks
i make a Windows form. after debug and save form, i make a change in form but change not show in form when debug. why?
Why used While loop(empty)?
can you also have tutorial on How To Search Values From MySQL Database And Set It Into TextBox?
dude u taught me a lot of stuff from your videos thanks man
could someone teach me how to update from the data grind not from the text box
why there is no error when
I did not put any number in EId.txt but the messagebox show is still update
I want to incounter it in error
edi.txt
username.txt
password.txt
are missing please insert
thank you..nice video. easy to learn also.
Anyone know how to add horizontal lines in designmode (like in HTML <hr />)
Great tutorials!
I need some help, in the databse, my first column (the primary key) I have a name, so it's set to VARCHAR(45) and the rest of my columns are numbers, wich is also set to VARCHAR(45).
When i translate the data from my c# to MySQL, i Reads:
"System.Windows.Forms.TextBox, Text: 58.8"
This is what is says in the columns, insted of just 58.8, it says: "System.Windows.Forms.TextBox, Text:" in front of it.
Why is that?
nothing esle to say . all is into this video .
think you
even if u choose eld = 1000 they will show you that the data r changed !!
I get : data type mismatch in critieria expresson. Any tips? Don't understand the error, when it works fine for adding (saving) users.
Very useful information! Thank you for your effort and hard work!
1 question: What if I want to update just 1 field from DB, for example only the First Name and leave everything the same ?
How to connect Database ?
thank for the video
This kind of tables contain a column that is marked as "Primary Key". Primary Key means that same data cannot repeat and null data cannot be inserted. In this table, I think "Eid" is primary key. Therefore, it is logical to depend to this column. However, if the column you use is not Primary Key or Unique Key, then you must add "AND tablename = ' " + tablenameValue + " ' " after "this.Eid_txt.Text +" code.
Any idea how instead of not just depending on if it's the same eid but on another column as well at the same time?