C# Tutorial 7: Edit/Update a data from Database with button




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”

  1. 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

  2. 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?

  3. 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.

Leave a Reply