C# Tutorial - Insert Update Delete data in Database from DataGridView | FoxLearn

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 314

  • @mjkl614
    @mjkl614 6 ปีที่แล้ว

    I don't know how much thanks I owe ya for this video, I noticed you have been updating the video even though keeping the title the same, this video has finally resolved my doubts about linking two data tables using entity framework and display it on a datagridview, job well done, I really owe you a beer! Cheers!

  • @dhanniekristanto
    @dhanniekristanto 8 ปีที่แล้ว

    Good hands on tutorial. Everyone commenting here asked for source code. wow

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Hi, And how about you ? Have you got any difficult with the tutorial ? thanks

  • @rissoulimohammed5344
    @rissoulimohammed5344 3 ปีที่แล้ว +1

    Thank you for this video, it was very helpful, I have problem, I create inventory management system, I want to add new categories using text box in form 3 to show categories in combo box in form 2(as you do frmaddeditstudent ), textbox is connect database (categories) and combobox connect to database (stock) now when I add categories in the textbox and save it with the same method you do in the video doesn't save and combobox only show the categorie how I put them in the table as you do with city tabel 11:21 please, help me please its very importing for me.

  • @zerosandones7547
    @zerosandones7547 4 ปีที่แล้ว

    Why can't I establish a relationship here @11:04?
    I clicked the "play" button and didn't work, I even refreshed and restarted my sql server. I am using 2019 version

  • @monirajv
    @monirajv 3 ปีที่แล้ว

    Great Tutorial.

  • @TumeloMotsoeneng
    @TumeloMotsoeneng 8 ปีที่แล้ว

    great work. thanks...learning C# and this was helpful

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Thank you so much !

  • @anagor9555
    @anagor9555 3 ปีที่แล้ว

    Helpful video. Thank you!

  • @tkhaidarov
    @tkhaidarov 7 ปีที่แล้ว

    How did you designate in the form frmAddEditStuident' properties AcceptButton - btnSave???

  • @JaimeChavarriaMartinez
    @JaimeChavarriaMartinez 8 ปีที่แล้ว

    Nice Video. Thanks.

  • @mjkl614
    @mjkl614 6 ปีที่แล้ว

    One more question, is there a way to save the cityid each time I enter into the edit screen? seems like it always defaulted to the first item, many thanks!

  • @torchok19081986
    @torchok19081986 7 ปีที่แล้ว

    great video like always! Thanks. Only one question. How do i show icon besides Formnametext ?

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      Button or Tile button?

  • @anitasrihandayani1104
    @anitasrihandayani1104 7 ปีที่แล้ว +1

    Tutorial is very good, but i want to ask if make *"button search"* how?
    Continued from this tutorial

  • @osiris5449
    @osiris5449 7 ปีที่แล้ว

    This Database I'm downloading (The up-to-date version of what you got);
    does it allow connections over the internet? Let's say I'm making a social app,
    how would I handle that kind of data between everyone? This type of Database?

  • @eythimis
    @eythimis 8 ปีที่แล้ว

    Very nice video that explains a lot! However I wanted to ask you if you begin editing a row and change one or two fields and then close the edit dialog without saving, the underlying data in binding context would have changed.Correct? And hence those data would have been displayed in the grid but not persisted in database. Is my assumption correct?
    Also could you send me the source code?
    Thanks again for the great video!

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว +1

      That's right. You data don't save to database. Sent. Please check your email. Thanks

  • @MrNvQuy
    @MrNvQuy 7 ปีที่แล้ว

    nice guide !

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      Thank you so much !

  • @KJ4000
    @KJ4000 7 ปีที่แล้ว

    Very nice, this works... All but the save button in the studentInfo form works for me. When pressed, it freezes.
    Very nice tutorial.

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      Thank you :)

    • @KJ4000
      @KJ4000 7 ปีที่แล้ว

      In the area where you add { Gender = false} in the using (productinfoForm frm = new productinfoForm(new tblproduct() {})) under the Add tile.. What do i pass here? I can see it want all the properties, but do i have to wirte like int pId, string name, string , age, and so on ? :S

    • @KJ4000
      @KJ4000 7 ปีที่แล้ว

      For some reason, the Saving via the AddEdit form does NOT work.
      the app just freezes. Nothing happens when i Press Save in frmAddEdit.. NO feedback but i'm unable to close the form or do anything else with the app.
      Can you send med the source code ? I've been trying for hours now to find the solution :(

    • @KJ4000
      @KJ4000 7 ปีที่แล้ว

      Wheni use forign key value from child table as displaymember or valuemember is freeze, when i set valuemember and displaymember as the foreign key, it works..

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      Hi, What's your emai? thank you

  • @gennarocodagnone
    @gennarocodagnone 8 ปีที่แล้ว

    Very Good work!
    I have some questions...
    - After deleting a row, dataGridView does't update automatically.
    I must press the sequence:
    1. Delete
    2. Save
    3. Refresh
    Doesn't better to call SaveChangesAsync() right after delete?
    - Why after the sqeuence:
    1. Delete
    2. SaveChangesAsync()
    I need press Refresh button? (the dataGridView doesn't refresh automatically)
    Sorry for my english.
    Thanks

  • @ibuyanaamyice4579
    @ibuyanaamyice4579 2 ปีที่แล้ว

    Thanks you Best

  • @smiljanj
    @smiljanj 7 ปีที่แล้ว

    Hi! This tutorial is very good and really helpful. One question regarding editing. When you add a record, everything is ok with ComboBox data (you choose a city and its ID gets written into the record).
    But when you edit a record, ComboBox is not initialized with correct value from the DB, but rather set to its default value (as if you are creating a new record). What is the best practice to solve this (ComboBox being set to its correct value from the DB record when editing a record)?
    Many tnx for the answer.
    BR, Smiljan

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      Hi, You need to add a binding to combobox, then set display member and value member to the combobox

  • @ABsazerNer
    @ABsazerNer 5 ปีที่แล้ว

    there is a litle problem in your tutorial:
    when you click the Edit button, the City's comboBox doesn't get the selected city but only the first one in the comboBox
    can you tell me how to fix that in this case Pls.

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว

      Please check you ValueMember and DisplayMember. i think you miss something !

  • @luisc1794
    @luisc1794 7 ปีที่แล้ว

    Once I'm on the Student Info dialog box that I click on the address text box, the name on the city combo box disappears and when you select it doesn't let you save the record, no errors occur. Please help. thaks

  • @julianmanzano2446
    @julianmanzano2446 7 ปีที่แล้ว

    greet tutorial.. can u make the same tutorial using ADO??

  • @DanyXiony
    @DanyXiony 7 ปีที่แล้ว

    Hi nice tuto !
    I have a little problem for update an line on datagridView :
    If I click on button update my form show and if I change value and close it directly my datagridView show the new value.
    Is not good I don't click on save, I click on close >_<
    Can you help me ?
    Sorry for my english.

  • @johnarnoldcatedrilla4378
    @johnarnoldcatedrilla4378 4 ปีที่แล้ว

    I dont have navigation properties how to fix that?

  • @kumarrahul728
    @kumarrahul728 8 ปีที่แล้ว

    BackGround Music was awesome.. please tell me the name of music :P :)

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Green Leaves, you can find in youtube background music. thanks

  • @emmysmith8960
    @emmysmith8960 6 ปีที่แล้ว

    hi sir i like ur tutorials. can p/s create a complete school management system with modern ul framework . thank u

    • @foxlearn
      @foxlearn  6 ปีที่แล้ว

      OK. Thank you for your suggestion !

  • @mrkhedr
    @mrkhedr 7 ปีที่แล้ว

    When I go to edit form... City not initial correct always get first value. and when you choose edit row you choose row not have city .. How can I initial City value... Thank you

  • @IonWP
    @IonWP 8 ปีที่แล้ว

    Thanks for tutorials. How to install ms sql server ?

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Hi, You can view this video th-cam.com/video/ARpVZetApAY/w-d-xo.html (How to install SQL Sever step by step). Thanks

    • @IonWP
      @IonWP 8 ปีที่แล้ว

      Thanks

  • @allhaillelouchvibritannia7494
    @allhaillelouchvibritannia7494 6 ปีที่แล้ว

    @foxlearn I know this comment is a bit too late but I just want to know if Metro UI is compatible with visual basic?

    • @foxlearn
      @foxlearn  6 ปีที่แล้ว +1

      Yes, You can use metro framework with vb.net. I'll upload video tutorials vb.net + metro framework as soon as possible ! Thank you my friend.

  • @fredyangelugarteportilla5163
    @fredyangelugarteportilla5163 6 ปีที่แล้ว

    When click on saveValidation failed for one or more entities. See 'EntityValidationErrors' property for more details

  • @rvsusi4046
    @rvsusi4046 6 ปีที่แล้ว

    The video was excellent and making me to do this. But I don't have the software application both front-end and back-end. Can you please send me the apt full download link. Please

  • @moeinrahimi3674
    @moeinrahimi3674 8 ปีที่แล้ว

    when i try to add record it says : cityName filed does not exist

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Hi, Please make sure that cityname filed exist in your table, Please check again. Thank you

  • @arnaudngabgna5166
    @arnaudngabgna5166 7 ปีที่แล้ว

    very nice thanks for this tuto. But in my own i have an error. infact i am using Nhibernate and the foreign key refused to be add

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      I think you should fill all value to your object, include foreign key

  • @hanssss13
    @hanssss13 4 ปีที่แล้ว

    db.student.Remove(dataGridView.Rows[i].dataBoundItem as Student)....... i didn't find .remove, why?

    • @foxlearn
      @foxlearn  4 ปีที่แล้ว

      Please check your code again, i think you missing something

    • @hanssss13
      @hanssss13 4 ปีที่แล้ว

      @@foxlearn ..Remove(......) like that??

    • @hanssss13
      @hanssss13 4 ปีที่แล้ว

      do you add 'using' ?

  • @AnasAbbasDev
    @AnasAbbasDev 7 ปีที่แล้ว

    thanks a lot , could you pleas provide me with the metro framework dll file.

    • @AnasAbbasDev
      @AnasAbbasDev 7 ปีที่แล้ว

      on my email >>
      anas.abass1@gmail.com
      please ^_^

  • @MuhammadRizwan-cj5jo
    @MuhammadRizwan-cj5jo 8 ปีที่แล้ว

    Fox Learn please help ... Error (Value cannot be null. Parameter name : entity) ???

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Hi, Please make sure that you set primary key is identity. Please check your code again. thanks

  • @ABsazerNer
    @ABsazerNer 5 ปีที่แล้ว

    Why was the only method which didn't work for me is the delete

    • @foxlearn
      @foxlearn  5 ปีที่แล้ว +1

      Please check your code again. I think you miss something. Thank you !

    • @ABsazerNer
      @ABsazerNer 5 ปีที่แล้ว

      @@foxlearn yes you're right I fixed it , now with the Add form,in my case this form is for detail table, how can edit the code to put the Selected master's ID in this detail table ?
      and thank you for your fast reply

    • @ABsazerNer
      @ABsazerNer 5 ปีที่แล้ว

      Ok I did it. Wow it's so simple, actually I really love entity framework

    • @flormariaayalarondan4743
      @flormariaayalarondan4743 5 ปีที่แล้ว

      Hi, can you tell me how did you fix the problem? the delete method doesn't work for me

  • @manvitnaidu4781
    @manvitnaidu4781 7 ปีที่แล้ว

    i am not able to found student in "Data source configuration wizard "

  • @alaouchicheabdellah4986
    @alaouchicheabdellah4986 7 ปีที่แล้ว

    That was great, BUT CAN U TRY TO EXPLAIN, a little bit, please, most of DataBase stuff were not clear at all. Seriously Bro, your tutorials are great, but this one really made me crazy, database stuff were very confusing.

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว

      OK. Thank you for your suggestion. I'll try more

  • @TM-vg2mt
    @TM-vg2mt 7 ปีที่แล้ว

    Thank you for tutorial...Can i have the source code and Metroui folder with dll please???
    i hope you give me
    thank you...i already liked and suscribe your video

    • @TM-vg2mt
      @TM-vg2mt 7 ปีที่แล้ว

      tannuru_98@yahoo.com this my email please sent the code and library metro ui

  • @abdulrahmanrefaei1023
    @abdulrahmanrefaei1023 7 ปีที่แล้ว

    brilliant ! would you please send me the source code please?

  • @yilmaz070
    @yilmaz070 8 ปีที่แล้ว +1

    +1

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Thank you :)

    • @yilmaz070
      @yilmaz070 8 ปีที่แล้ว

      No problem :)

    • @yilmaz070
      @yilmaz070 5 ปีที่แล้ว

      @@melezprens8158 anna'a koyabilirsiniz!

  • @semikolon4229
    @semikolon4229 7 ปีที่แล้ว

    Please share the source code on github.

    • @foxlearn
      @foxlearn  7 ปีที่แล้ว +1

      Thank you for your suggestion

  • @JJedai
    @JJedai 7 ปีที่แล้ว

    Done! if someone wants the code, let me know ....

    • @mackenziesmith6624
      @mackenziesmith6624 7 ปีที่แล้ว

      Can I have the source code please? Smithkenzie86@yahoo.com

  • @chrzan131
    @chrzan131 8 ปีที่แล้ว

    :)

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Thank you :)

  • @JokerZipon
    @JokerZipon 8 ปีที่แล้ว

    У меня есть предложение по видео, можно ваш e-mail !

    • @foxlearn
      @foxlearn  8 ปีที่แล้ว

      Yes, You can send your suggestion to my email : tanhynh@gmail.com . Thank you so much :)

    • @JokerZipon
      @JokerZipon 8 ปีที่แล้ว

      Отправил письмо. Жду одобрения. Спасибо.

  • @hassanfawaz171
    @hassanfawaz171 4 ปีที่แล้ว

    ااي