Insert,Delete and Update data in database from datagridview in c sharp

Sdílet
Vložit
  • čas přidán 20. 05. 2014
  • These tutorials teach how to insert data's in SQL server using windows forms. This tutorial helps to insert, delete & update data's through grid-view to the database in a step by step with very basic and easy steps.
    Email: nembooli@gmail.com

Komentáře • 120

  • @hamidrezaashkiyan
    @hamidrezaashkiyan Před 5 lety +2

    I was trying to do this for 3 weeks and finally i did it. I am so HAPPY. THANKS.

  • @nidhindavid634
    @nidhindavid634 Před 9 lety

    Worked perfectly with MySQL server. Thanks for your kindness

  • @hareesonline
    @hareesonline Před 8 lety +1

    Dear Vetrivel it works fine..
    It is really agood piece of work of you. Many thanks.
    this makes the things easier for a programmer to play with SQL

  • @mmranjani8173
    @mmranjani8173 Před 3 lety +1

    I am from Sri Lanka. Your videos are very easy to understand. They are very helpful me while doing my assignments. Thank you so much.

  • @user-gf5vt4vn9o
    @user-gf5vt4vn9o Před 2 lety

    Thanks a lot. Your video saved me. Simple and efficient database update via datagridview.

  • @hungcotcvn
    @hungcotcvn Před 7 lety

    your code is very easy to get it! Thanks! I am a big fan of your work!

  • @scherka
    @scherka Před rokem

    MAAAAN you're awesome! From Russia with respect

  • @AlexKayzProductions
    @AlexKayzProductions Před 8 lety

    Great video ! Thanks for help !

  • @malcs3758
    @malcs3758 Před 8 lety

    I find the code tremendous value. Makes me remember the amber screen days and other techniques.

  • @ash.b2247
    @ash.b2247 Před 6 lety

    Thanks man. Keep it up. Subbed!

  • @yamyam2699
    @yamyam2699 Před 8 lety

    thanks, it really help us for our thesis project :))

  • @rosinavega6615
    @rosinavega6615 Před 8 lety

    muchas gracias. he aprendido mucho con el material que has subido

  • @harshvaid8860
    @harshvaid8860 Před 9 lety

    thank you....
    i wants more videos like these....

  • @muhammadilyasmaz7242
    @muhammadilyasmaz7242 Před 3 lety

    In Really Dear Sir Ur methodology is so best thanks
    I am From Afghanistan

  • @ildephonsendacyayisenga

    I am from rwanda.your video is very helpful

  • @genogurirab8061
    @genogurirab8061 Před 2 lety

    It is well explained ,eazy to understand video ,I love it alot and it was very helpfull.

  • @manhtuongtran5793
    @manhtuongtran5793 Před 9 lety

    It's useful ! Thanks.

  • @johnfrades
    @johnfrades Před 8 lety

    Thanks for this!

  • @RahulKumarRajendran
    @RahulKumarRajendran Před 9 lety +1

    thanks dear as a beginner this video helped me a lot.

  • @RoxReview
    @RoxReview Před 6 lety

    Thanks, Good Man!

  • @isuruaravinda9651
    @isuruaravinda9651 Před 9 lety +1

    Thank you bro!!

  • @arunrejiarunkalloor
    @arunrejiarunkalloor Před 9 lety +1

    Thanks u so much friend.
    :)
    (y)

  • @waelh6239
    @waelh6239 Před 6 lety

    really useful.
    Thanks.

  • @AvalonityTV
    @AvalonityTV Před 8 lety

    Thank you! works perfectly.

    • @kodajoaquin6633
      @kodajoaquin6633 Před 3 lety

      I realize it's kinda off topic but does anyone know a good place to watch new movies online ?

    • @callenbyron8111
      @callenbyron8111 Před 3 lety

      @Koda Joaquin Try FlixZone. You can find it by googling =)

    • @ephraimcash875
      @ephraimcash875 Před 3 lety

      @Callen Byron Yea, been watching on FlixZone for years myself =)

    • @kodajoaquin6633
      @kodajoaquin6633 Před 3 lety

      @Callen Byron Thank you, I signed up and it seems like a nice service :D Appreciate it!

    • @callenbyron8111
      @callenbyron8111 Před 3 lety

      @Koda Joaquin no problem xD

  • @jameskimuyu1317
    @jameskimuyu1317 Před 6 lety

    Very helpful indeed

  • @barmam4987
    @barmam4987 Před 4 lety

    I can't find this table. Could you help me? I use Windows 10 and Visual Studio 2017 and 2019

  • @talhatariq5530
    @talhatariq5530 Před 2 lety

    Tremendous Sir

  • @EnsidiaGaming
    @EnsidiaGaming Před 9 lety +6

    where is the INSERT part mate?

  • @renzosanantonio5952
    @renzosanantonio5952 Před 7 lety

    Thanks a lot 😃😃

  • @pndatasystem
    @pndatasystem Před 7 lety

    This type of program not working in Visual Studio 2015 with dynamic SQL. If Select statement have where then it is not working. If you have solution then please provide.

  • @bekasbekas3358
    @bekasbekas3358 Před 7 lety

    thank you very match

  • @jashsoft3762
    @jashsoft3762 Před 4 lety

    10/10 good one.

  • @MEETEJAS
    @MEETEJAS Před 2 lety +1

    This getting error
    object reference not set
    (DT)

  • @pysedon
    @pysedon Před 9 lety

    thank you

  • @badrunnaharkhan846
    @badrunnaharkhan846 Před 8 lety

    Sir if I want to put a delete button and i want to delete using that button then how can we do that ?

  • @dattabhabal421
    @dattabhabal421 Před 7 lety

    in gridview it not showing me enable adding,deleting,editing why i so can u tell me

  • @hassanhas_1223
    @hassanhas_1223 Před rokem

    Hi!
    Please how can I get database from Google sheets?
    I want to show it on gridview..

  • @natorikatsuro1133
    @natorikatsuro1133 Před 7 lety

    10/10 bro

  • @holebasupanishetti3762

    I am Getting Error "System.InvalidOperationException : 'Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information'

  • @CarlosAOrtizG
    @CarlosAOrtizG Před 8 lety

    +Vetrivel do U think with your video we can learn how to program?

  • @mohamed_adel1
    @mohamed_adel1 Před 5 lety

    Thanks

  • @AmyLe01
    @AmyLe01 Před 9 lety +1

    How do we create the parameter (i.e Select Cus code, Cus Name....) for SqlDataAdapter in Visual Studio 2013? When clicking new query from the table in Server Explorer, there is no option to add table

  • @moonshine-vg2qt
    @moonshine-vg2qt Před 8 lety

    Hi, thankyou for your tutorial!
    but where's the delete command?

  • @zhengzhou5849
    @zhengzhou5849 Před 6 lety

    In Button1_Click, I do a little adjustment, it works now
    string conString = "Data Source=WIN-3HH0R1TE1AB;Initial Catalog=ExampleSQLDb;Integrated Security=True;Pooling=False";
    SqlConnection con = new SqlConnection(conString);
    con.Open();
    SqlDataAdapter sda = new SqlDataAdapter("select * from Table1", con);
    SqlCommandBuilder scb = new SqlCommandBuilder(sda);
    DataTable dt = (DataTable)dataGridView1.DataSource;
    sda.Update(dt);

  • @ilyastrekalo9449
    @ilyastrekalo9449 Před 5 lety

    thx!

  • @massaridx
    @massaridx Před 4 lety +1

    You can do this query insted of yours (Select * from [table name])

  • @obaidrehman1
    @obaidrehman1 Před 8 lety

    Nice Tutorial can u show me how to delete records....

  • @ajaxkm
    @ajaxkm Před 7 lety +1

    I got it working. Thanks a lot. but when I reload my table. I get something like this:
    1 name1
    2 name 2
    30
    It keeps doing that. and doesn't start with 3

  • @Priyanka59ify
    @Priyanka59ify Před 10 lety

    thank u show much it helped me a lot............can u help me to add on delete button to delete the record from datagridview

  • @bhenbarce4501
    @bhenbarce4501 Před 7 lety

    can this code work using wpf ?

  • @minhhainguyen1153
    @minhhainguyen1153 Před 10 lety

    Can you helpme, insret buton, in form iclude datagridview and textbox (show infomation for each column in datagridview). Thanks

    •  Před 8 lety

      +minh hai Nguyen welcome laptrinhvb.net

  • @LiterallyJesusChrist
    @LiterallyJesusChrist Před 9 lety

    I followed same instructions, but I can not delete any record, my application throws exception: "Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information." when I try to "Update" after deleting a row. Is this due some setting in the Database or Table?

    • @OMSoundar
      @OMSoundar Před 9 lety

      hi me too get same error Dynamic SQL generation how to rectify this error anyone share and fix this.... i am using SQL server 2008

  • @Wayne_Maganyani
    @Wayne_Maganyani Před 8 lety

    I'm finding it to connect to my database. may anyone please help me

  • @sophoakhon3539
    @sophoakhon3539 Před 5 lety

    i have a problem on
    scb =new SqlCommandBuilder(sda);
    sda.Update(dt);
    so what can i do?

  • @tyronwilliam9417
    @tyronwilliam9417 Před 8 lety

    how can i display messagebox when one of rows is null? i want to make exception for that situation, please help. BTW thiw video saved my project, thank you

  • @showieeliezer2951
    @showieeliezer2951 Před 7 lety +4

    where's the deleting?

  • @brigoose7945
    @brigoose7945 Před 4 lety

    from 4:50 I cant do insert query or anything,...help

  • @shehbaz1994
    @shehbaz1994 Před 7 lety

    hello sir there is a problem when in i type the same code in the visual studio 215 i got an error during updating the gridview data how to handle this
    the error is
    Dynamic sql generation for the update command is not supported against a selectcommand that does not return any key column information

    • @pndatasystem
      @pndatasystem Před 7 lety

      Hello Muhammad i have same problem this program doesn't work in Visual Studio 2015. If you found any solution then please let me know.

    • @idlevandal69
      @idlevandal69 Před 6 lety

      It means when you did your SELECT statement in your sqlAdapter you didn't include the Primary Key from the table you were querying

  • @brigoose7945
    @brigoose7945 Před 4 lety

    I have no option for new query

  • @karumbaevtv3929
    @karumbaevtv3929 Před rokem +1

    Харош чел

  • @moneymoney5229
    @moneymoney5229 Před 5 lety

    how to close the datagridview or how to reset it

  • @hurikhan
    @hurikhan Před 9 lety +10

    What kind of language is that???

    • @VetrivelD
      @VetrivelD  Před 9 lety +2

      Uros Gorensek Thanks Brother.. Further Any Doubts then feel free to ask me.. if you like our tutorials then kindly share your friends..

    • @nikhillll
      @nikhillll Před 8 lety +3

      +Uros Gorensek Hey do not see the language that he is speaking. Learn the stuff that he is teaching you free of cost !!

    • @aadnan7450
      @aadnan7450 Před 7 lety

      if u want to learn in good language than join the institutes

    • @sliceofdeathothers114
      @sliceofdeathothers114 Před 7 lety

      c#

    • @abielst7581
      @abielst7581 Před 7 lety

      C# bro

  • @pakgeochannel8419
    @pakgeochannel8419 Před 5 lety

    visual studio c# mea ContextMenuStrip mea radiobutton mea TopMost ko control karne ka treak kea hai

  • @seidmohammed640
    @seidmohammed640 Před 8 lety

    it is very interesting tutorial .please help me if you have any tutorial or source code about plagiarism testing system

  • @abipatil6641
    @abipatil6641 Před 7 lety

    {"Object reference not set to an instance of an object."} getting this problem sir

  • @hamzaAkB
    @hamzaAkB Před 8 lety

    Sir it's not working all code is ok but don't know why data is not updating in database :/

  • @regismaltais5743
    @regismaltais5743 Před 9 lety +3

    It would be nice if you provide a link to your source code

    • @VetrivelD
      @VetrivelD  Před 9 lety

      Regis Maltais Thanks Brother.. Further Any Doubts then feel free to ask me.. if you like our tutorials then kindly share your friends..

  • @ajithkumar5581
    @ajithkumar5581 Před 2 lety

    Sir I tried this process but it doesn't getting updated..reason sir

  • @isaac-9185
    @isaac-9185 Před 2 lety

    it seems like the database is not updated

  • @mentalismtrainer
    @mentalismtrainer Před 8 lety

    sir it's not working on my system. error is:{"Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information."}
    i selected table by where condition .
    string sql = "select item,Qty,Price,Total_price,work_status,Bill_No from item_dtls_tab where Bill_No='" + comboBox1.Text + "'";
    da = new SqlDataAdapter(sql, cn);

    • @kris4117
      @kris4117 Před 7 lety

      First Work on the example given in the video. Then try your ownpaying attention to the syntax. These videos are for help in understanding.Take your time to patiently work through.

    • @ahtramraheel3908
      @ahtramraheel3908 Před 7 lety

      your table doesn't have any primary key. Add a primary key in your table and your error will resolve.

  • @mishellethomson9772
    @mishellethomson9772 Před 8 lety

    hi my freínds great work could you please share the code ?

  • @RF-gj4wb
    @RF-gj4wb Před 8 lety

    the subs at 0:40 tho...

  • @-tewahdo1023
    @-tewahdo1023 Před 2 lety

    Can you provide a link to your source code

  • @Vereonis
    @Vereonis Před 9 lety +23

    I have no idea wtf you're saying.

    • @jaworq
      @jaworq Před 6 lety +4

      you dont have to. He shows everything what he is doing. Don't act an idiot.

  • @kiszatay6149
    @kiszatay6149 Před 4 lety

    why am i always getting problems with these

  • @dalviringh371
    @dalviringh371 Před 9 lety

    errror on
    sda.update(dt);
    plz help

    • @Dogwithknife
      @Dogwithknife Před 9 lety

      dalvir singh i have the same problem. appears to be null exception. how to fix?

    • @mehedimisson
      @mehedimisson Před 4 lety

      you might have used "Select * from [table_name]"
      use column names like "Select name,age,phone from [table_name]"
      that will do i hope !

  • @pakgeochannel8419
    @pakgeochannel8419 Před 5 lety

    visual studio c# mea ContextMenuStrip mea radiobutton mea TopMost ko control karne ka treak

  • @zureasurchi708
    @zureasurchi708 Před 7 měsíci

    links video databas ples

  • @natsume5372
    @natsume5372 Před 3 lety

    Where is delete?

  • @mohamadfoudeh2111
    @mohamadfoudeh2111 Před rokem

    WHERE DELETE ?? THANKS

  • @dalviringh371
    @dalviringh371 Před 9 lety

    not working

  • @user-xe1un3vw7w
    @user-xe1un3vw7w Před 7 lety

    can you give kod? plaseeeeee

  • @littlenarwhal3914
    @littlenarwhal3914 Před 5 lety

    Dude get your mic sorted out, and speak more loudly and articulate PLEASE!!!

  • @ichide7
    @ichide7 Před 8 lety +6

    why programers never put the f*cking code downloadable or in the description, what they are expecting? +Vetrivel D it's an advise.

    • @VetrivelD
      @VetrivelD  Před 8 lety +1

      +ichide7 Thanks for your Feedback. I Will make one blog and i will give that links..
      Please Ask any Doubts i will make video for that..!

    • @hungtran2072
      @hungtran2072 Před 8 lety

      +Vetrivel D hi,it just have an update and fetch data,where is Delete command ?

    • @robertanic7799
      @robertanic7799 Před 8 lety

      +Vetrivel D Do you have Entity Framework example ? And with 2 or more ways how to bind to grid.

    • @quaxiscorporationforresear5557
      @quaxiscorporationforresear5557 Před 7 lety +10

      I hate when people want to learn to do something but are too lazy to type the code themselves. There's barely any code to type. The creator of this video doesn't expect anything. Programmers don't really hold people by the hands and just give you everything. Seriously, you actually learn better when you type code. Any teacher will tell you that.

    • @kirkin2006
      @kirkin2006 Před 7 lety +1

      Excelent.

  • @farooqrasheed7145
    @farooqrasheed7145 Před 6 lety

    where is insert and delete code ? time waste

  • @hafizsalmanmalik2813
    @hafizsalmanmalik2813 Před 5 lety

    wasting of time.

  • @nonamezz20
    @nonamezz20 Před 7 lety

    Rubbish

  • @hassanhas_1223
    @hassanhas_1223 Před rokem

    Hi!
    Please how can I get database from Google sheets?
    I want to show it on gridview..