C# MySql CRUD : Insert Update Delete View and Search

Поділитися
Вставка
  • Опубліковано 10 лют 2025

КОМЕНТАРІ • 123

  • @CodAffection
    @CodAffection  7 років тому +3

    goo.gl/RFY5C2 : Subscribe to CodAffection
    goo.gl/ejEvDb : MS SQL CRUD Operations in SQL Server
    goo.gl/NhNQeZ :Export Excel in C# Applications
    goo.gl/WsgPbp :C# User Registration With DB

    • @onyangoishmail9369
      @onyangoishmail9369 6 років тому

      help me workbench dowload link

    • @jirehla-ab1671
      @jirehla-ab1671 5 років тому

      CodAffection, Can you do this again but this time it's on Postgresql.

  • @lesmiklos3558
    @lesmiklos3558 6 років тому +6

    I found this to be an excellent , step-by-step guide to creating a CRUD application using c# in Visual Studio and mySql. I particularly liked the fact that you took the time to show the actual steps involved in setting up a new database and stored procedures in MySql and showed the C# code required to link things together. Thank you very much!

  • @antoniojuric6946
    @antoniojuric6946 4 роки тому +2

    YOU. SAVED. MY. LAZY. ASS. STUDENT. LIFE.
    Ty sooo much dude...

    • @vekyy120
      @vekyy120 4 роки тому +1

      HAHAHAHAHAHAAHHAHAHA

    • @antoniojuric6946
      @antoniojuric6946 4 роки тому

      @@vekyy120 Daj me nemoj jebat, kolke su sanse 😂😂😂

  • @coopertine
    @coopertine 7 років тому +4

    Thank you for the tutorial! I've searched lots of video already concerning this topic but yours is the first one I've seen where most of the codes were explained, so, it's really easy to follow.

  • @KingDrekon
    @KingDrekon 7 років тому +6

    Thank you so much. I've been looking for a straightforward tutorial on the subject that's easy to follow. You're awesome!

    • @CodAffection
      @CodAffection  7 років тому

      Glad you found the video helpful.

    • @rigofutty5172
      @rigofutty5172 3 роки тому

      @@CodAffection Now I practice for exam. I learn to use the datagridview almost based on your videos. Thank you!

  • @jeffzz111
    @jeffzz111 2 роки тому +1

    useful!

  • @constantinoscoveos9233
    @constantinoscoveos9233 2 роки тому

    THANK YOU VERY MUCH !!! Fantastic example given by a fantastic tutor. Greetings from Greece.

  • @pedroribeiro6271
    @pedroribeiro6271 4 роки тому

    Great video!! Really helped me to understand how to connect vs code to mysql. This video earned you a subscriber. Again Thanks. And I'm looking forward for more projects like this.

  • @georgebaco6422
    @georgebaco6422 3 роки тому

    Beautiful.. Very informative and easy to understand.....

  • @chiemike1779
    @chiemike1779 4 роки тому +1

    Really great tutorial, great explanations thank you

  • @AyatTV-82
    @AyatTV-82 4 роки тому +1

    cool video keep up the amazing content

  • @trabajocorreoffu3380
    @trabajocorreoffu3380 3 роки тому

    Excellent. Great. Thanks.

  • @jinpogi4478
    @jinpogi4478 5 років тому

    This really helped me out.
    Thank you and I hope u keep doing videos like these.

  • @stuartwillcocks4048
    @stuartwillcocks4048 5 років тому +1

    This is an excellent tutorial. Thank you!

  • @jorgealbertogarciaestrada6825
    @jorgealbertogarciaestrada6825 5 років тому +1

    great video :3 thanks man

  • @jeffersonXPLODE
    @jeffersonXPLODE 6 років тому

    Thank you, My project needed to be portable só I used MySql in Xampp, and you helped me a lot.

    • @CodAffection
      @CodAffection  6 років тому

      Glad you found the video helpful.

  • @kiomortis2881
    @kiomortis2881 3 роки тому

    hi, can u use this application in other pc without mysql ?? i mean do you have to install mysql in every system you want this on ?

  • @pacoreyna8539
    @pacoreyna8539 4 роки тому

    This tutorial is fantastic. Thank you!

  • @longjump123
    @longjump123 6 років тому

    Pretty neat tutorial. Precise and right to the point. Thank's friend.

  • @vichy13
    @vichy13 4 роки тому

    thhanks this helped me :)

  • @ОляГромова-ф1н
    @ОляГромова-ф1н 4 роки тому

    THANK YOU SOOOOOO MUCH!!!!!!!

  • @justB121
    @justB121 7 років тому

    Thanks, man! Helped a lot :D, keep doing what you're doing :))

  • @sadiegoc
    @sadiegoc 4 роки тому

    nice video, thank you

  • @akmalmaulana7704
    @akmalmaulana7704 6 років тому +2

    your tutorial is helping me, can u do the tutorial how to delete multiple data in data grid view thank you

  • @MauricioCaterino
    @MauricioCaterino 7 років тому +1

    That's Great. I already watched. I guess for MySQL you just use MySqlconnection instead

  • @martinled7493
    @martinled7493 5 років тому +1

    Can you make a video where you have to tabels with a relationship, one to many etc. and how you can show a entryfield in the GUI. Thanks a lot for this video, its GREAT ! :)

    • @CodAffection
      @CodAffection  5 років тому

      how about this video : ua-cam.com/video/1kT3KaZcNn8/v-deo.html

  • @MUSICA1742
    @MUSICA1742 7 років тому

    Very Nice!! Thank You so much. I learned a lot.

    • @CodAffection
      @CodAffection  7 років тому

      Glad you found the video helpful.

  • @alvinenriquez8009
    @alvinenriquez8009 3 роки тому

    hello how did you get your Connection String. thank you so much.

  • @ramil_b
    @ramil_b 6 років тому

    Thank you so much! Was looking for video like this for a long time. Thanks, man

    • @CodAffection
      @CodAffection  6 років тому

      glad you found the video useful.

  • @troylasco8297
    @troylasco8297 6 років тому

    Thank you very much!

  • @NeonNippon
    @NeonNippon 6 років тому

    thank you for your good lecture!! it's really helpful!!!

  • @ricasempron6579
    @ricasempron6579 6 років тому

    Great Tutorial Man :)

  • @eloyradillaandres2670
    @eloyradillaandres2670 6 років тому

    Muy buen tutorial!!

  • @davidc.7688
    @davidc.7688 5 років тому +1

    you're awesome

  • @soumayaalaoui2814
    @soumayaalaoui2814 3 роки тому

    thank you

  • @lesmiklos3558
    @lesmiklos3558 6 років тому

    Super Video !

  • @solution-infotech
    @solution-infotech 6 років тому

    Bro your tutorials are so good easy to understand I request you to make a tutorial on like how to give product discount like 5%, 10%, 12%, etc depends customers visit to my medical retail pharmacy I hope you will help me

  • @gabrielmarques315
    @gabrielmarques315 3 роки тому

    I LOVE YOU MY INDIAN BOY, THANK YOU SO MUCH MY FRIEND!!!!!!!

  • @patoshoty7855
    @patoshoty7855 4 роки тому

    Thank alot

  • @raulsantosneto
    @raulsantosneto 7 років тому

    Very useful, tks!

  • @immanuelsuleiman7550
    @immanuelsuleiman7550 7 років тому

    very awesome
    thank you

  • @catjamescat3646
    @catjamescat3646 4 роки тому

    Hello. It's fine example, but why don't you do it through classes?

  • @joaonascimento1001
    @joaonascimento1001 5 років тому

    Thank you very very very much for you kindness. Someday, when I become a software billionare I will remember you and reward you for this class.

    • @CodAffection
      @CodAffection  5 років тому +1

      That's very kind of you. keep learning and sharing.

  • @AbShankar04
    @AbShankar04 7 років тому +1

    Thanks for this tutorial can you do same in WPF .

  • @renaldiarlin7919
    @renaldiarlin7919 5 років тому

    your tutorial is really great but I need to make the published program not project can you make a new tutorial for that (like for transferring our application to another computer)

  • @MauricioCaterino
    @MauricioCaterino 7 років тому

    Excellent tutorial. It´s possible to do the same tutorial using dapper?

    • @CodAffection
      @CodAffection  7 років тому +1

      sure, here it is : ua-cam.com/video/4GJOKEG5PpA/v-deo.html

  • @MrGaia
    @MrGaia 6 років тому

    Hehe, I probably should have added my first comment to your other video here it seems like :)

  • @coopertine
    @coopertine 7 років тому

    Btw, do you think a login system could be created using the methods you used in this tutorial?

    • @CodAffection
      @CodAffection  7 років тому

      for login-logout you can try this : ua-cam.com/video/NX8-LhgFnUU/v-deo.html

  • @강모든-p9k
    @강모든-p9k 6 років тому +4

    So hard to understand with this accent but helpful...

  • @tpops2697
    @tpops2697 4 роки тому

    I need to do this, but with WPF in a user control. Any insight on how that works?

    • @CodAffection
      @CodAffection  4 роки тому

      try this : ua-cam.com/video/72366X1-heg/v-deo.html

  • @ginopornasdoro3081
    @ginopornasdoro3081 5 років тому

    Do you have login tutorial using mysql workbench?

    • @CodAffection
      @CodAffection  5 років тому

      yes. ua-cam.com/video/v283Kb80RjE/v-deo.html

  • @charlotteerrazki7612
    @charlotteerrazki7612 6 років тому

    Subscribed

  • @javazantech
    @javazantech 4 роки тому

    Show thanks

  • @kurtpatrickgalvez3967
    @kurtpatrickgalvez3967 6 років тому +1

    I don't have that mysql folder in my drive C do I need to download something so I can have that dll that needs to be added on the references part?

    • @SerhpimRoflaes
      @SerhpimRoflaes 5 років тому

      Yes, just install mySQL and you will be given a lot of tools (optional) Including the MySql connection net (the dll)

  • @orgrimdoomhammer2161
    @orgrimdoomhammer2161 6 років тому

    What did you do with datagridview, mine is breaking program, and displaying empty form, also cant connect with mysql?

  • @ashenkoralage3918
    @ashenkoralage3918 5 років тому

    I have an error like this , please tell me how to fix this : 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll
    The host localhost does not support SSL connections.

  • @ruthfrancisco5322
    @ruthfrancisco5322 2 роки тому

    you teach so clearly, but i tried doing this and when i click the save button, i encountered unhandled MySqlException. it says "Access denied for user 'root'@'localhost' (using password: YES)" but i did exactly as you did yours :(

  • @davidalvarez359
    @davidalvarez359 5 років тому

    The connection string is this one:
    string connectionString = @"Server=localhost;Database=bookdb;Uid=root;Pwd=root;";
    However when I test the program in Visual Studio 2017, I always get the same error after clicking the 'Search' button:
    i.postimg.cc/SNk9Vmfg/visualstudio-bookdb.png
    On the left you can see I successfully connected from Visual Studio
    to the bookdb from MySQL Workbench, but I'm unable to correctly connect
    from the project itself to the bookdb, even when the connectionstring
    seems to be all right
    Any ideas?
    Thanks

  • @TorSverre1
    @TorSverre1 6 років тому

    In the line mysqlCon.Open(); I get the error: System.NullReferenceException: 'Object reference not set to an instance of an object.' And I cannot find anything wrong in my connectionstring.

  • @augustoalmeida4614
    @augustoalmeida4614 4 роки тому +1

    video top recomendo a todos. do you know the way?

  • @sagyrax5188
    @sagyrax5188 5 років тому

    Dear sir, my search and delete button do not work. I just download your project, nothing is different

  • @yamikanngoma4854
    @yamikanngoma4854 3 роки тому

    I'm having error but followed your video very close its on executionNoNQuary;
    Error 1054 it says unknown column bookID in field list

    • @06minazmohammed22
      @06minazmohammed22 3 роки тому

      Hey did you find the solution, I'm having the same problem.

  • @shreeyakachhepati4138
    @shreeyakachhepati4138 5 років тому

    GridFill(); is being mistake what to do plz suggest

  • @spencerkimllido7327
    @spencerkimllido7327 7 років тому

    Does it work on Visual Studio 2010?

  • @varmaaddepalli8492
    @varmaaddepalli8492 5 років тому

    how to fix the error when txtBookName shows an error " txtBookName doesnot exist in the current context" ....can anyone please help me.

  • @karlamaba5370
    @karlamaba5370 3 роки тому

    how did you find this local server @"Server=localhost;Database=book;Uid=root;Pwd=123456;"; ???
    please I would appreciate your help

    • @CodAffection
      @CodAffection  3 роки тому

      it's configured while installing sql server instance.

  • @cognitonito2695
    @cognitonito2695 3 роки тому +1

    i love you man, no homo

  • @TriDocs
    @TriDocs 7 років тому

    wait, how can u use that "txtBookName" and other txt. U dont even initialize it

    • @hailtonmartinsjunior3332
      @hailtonmartinsjunior3332 7 років тому

      I need to know too! My app doesnt work!

    • @TriDocs
      @TriDocs 7 років тому

      nevermind. I figure it out already

    • @batuhanartan
      @batuhanartan 6 років тому

      You should rename the name of textbox in your form dude :)

  • @ziomalxxz
    @ziomalxxz 6 років тому

    mysql workbench close when i click apply BookAddOrEdit procedures :/

    • @CodAffection
      @CodAffection  6 років тому

      I think I had the same problem before. try to reinstall workbench.

    • @ziomalxxz
      @ziomalxxz 6 років тому

      It did not help
      :/

    • @CodAffection
      @CodAffection  6 років тому

      use different installer.

  • @gameyutubxx
    @gameyutubxx 5 років тому

    btw what's up with the search function? :v

  • @mr.RAND5584
    @mr.RAND5584 3 роки тому

    What is the purpose of cancel

  • @tulanikuyangkristyano8620
    @tulanikuyangkristyano8620 5 років тому

    Can you give me the source code, because I can't open the project in my visual studio 2010... please..

    • @CodAffection
      @CodAffection  5 років тому

      I should have given the source code link in description. please check.

  • @KausikRoygd
    @KausikRoygd 5 років тому

    dgvbook.CurrentRow.Index is not coming up in VS 2017

  • @Manifross
    @Manifross 6 років тому

    can someone please assist me i have followed the tutorial exactly how he did it but i keep getting this error.......
    An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll

    • @CodAffection
      @CodAffection  6 років тому

      pls check your db connection string.

    • @Manifross
      @Manifross 6 років тому

      it is exactly like yours
      {
      string connectionString = @"Server=localhost;Database=traveldb;Uid=root;Pwd="1234qqq";";
      int bookID = 0;
      public Form1()
      {
      InitializeComponent();
      }
      private void btnSave_Click(object sender, EventArgs e)
      {
      using (MySqlConnection mysqlCon = new MySqlConnection(connectionString))
      {
      mysqlCon.Open();
      MySqlCommand mysqlCmd = new MySqlCommand("BookAddOrEdit", mysqlCon);
      mysqlCmd.CommandType = CommandType.StoredProcedure;
      mysqlCmd.Parameters.AddWithValue("BookID", bookID);
      mysqlCmd.Parameters.AddWithValue("_BookName", txtBookName.Text.Trim());
      mysqlCmd.Parameters.AddWithValue("_Author", txtAuthor.Text.Trim());
      mysqlCmd.Parameters.AddWithValue("_Description", txtDescription.Text.Trim());
      mysqlCmd.ExecuteNonQuery();
      MessageBox.Show("submitted successfully");
      }
      }

    • @CodAffection
      @CodAffection  6 років тому

      pls watch this video to correct your connection string : ua-cam.com/video/WJ-CdeTGxp8/v-deo.html

  • @bayabas568
    @bayabas568 6 років тому

    does this work if the database is use is sql2014

  • @serkanaydnlk923
    @serkanaydnlk923 4 роки тому +1

    can you send me this code

  • @charlotteerrazki7612
    @charlotteerrazki7612 6 років тому +1

    Bro its not Skema its schema [pronounciation]

    • @ZeeZeeGaming
      @ZeeZeeGaming 6 років тому

      Schema is pronounced with a hard K sound

  • @learningislife2934
    @learningislife2934 5 років тому

    Please provide asp.net crud operation

    • @CodAffection
      @CodAffection  5 років тому

      here is asp.net mvc crud : ua-cam.com/video/_qIYBgWTlTo/v-deo.html
      we also have tutorial on crud with web form and .net core.

  • @onyangoishmail9369
    @onyangoishmail9369 6 років тому

    how did you set the password

  • @divyadivi5092
    @divyadivi5092 2 роки тому

    Method name error in 149