C# Insert Update Delete View and Search

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 215

  • @CodAffection
    @CodAffection  7 лет назад +1

    goo.gl/RFY5C2 : Subscribe to CodAffection
    goo.gl/NhNQeZ : Export Excel in C# Applications
    goo.gl/WsgPbp : C# User Registration With DB
    goo.gl/G6WRQR : C# Login Window

    • @eastonbenson4495
      @eastonbenson4495 3 года назад

      I know im randomly asking but does any of you know a method to log back into an Instagram account??
      I stupidly forgot the password. I appreciate any assistance you can offer me

  • @chielichiel
    @chielichiel 4 года назад +1

    People like you are lifesavers! Very clear tutorial. You have a lot of patience explaining all the steps in this tutorial. Thanks!!

    • @CodAffection
      @CodAffection  4 года назад

      Thanks for your wonderful feedback. let me know if your topic suggestion like this C#/ sql tutorial.

  • @oblivionX000
    @oblivionX000 6 лет назад +3

    Thank you my good man. This video has helped me a lot for my final projects. One of the best tutorial videos for C# hands down

  • @ganapathivaideeswaran9098
    @ganapathivaideeswaran9098 2 года назад

    Excellent Tutorial; must admit you are a great teacher. Keep up the good work.

  • @1974rachavez
    @1974rachavez 7 лет назад +2

    Thank you, very clear and good explanation. Can't wait to try it.

    • @CodAffection
      @CodAffection  7 лет назад

      glad to hear that, thanks for the comment

  • @SajjadAhmad-pe3vw
    @SajjadAhmad-pe3vw 2 года назад +1

    good experiance

  • @abdulsalam5797
    @abdulsalam5797 6 лет назад

    Best Crud operations i have everseen.

    • @CodAffection
      @CodAffection  6 лет назад +1

      Thanks for your kind words.

    • @abdulsalam5797
      @abdulsalam5797 6 лет назад

      @@CodAffection Sir if you don't mind.
      I need your help as my FYP is very close.

  • @civantot5510
    @civantot5510 3 года назад

    this is very helpful for my Assessment Brief. Thank you so much. From Philippines!

  • @jenniferpeterson5152
    @jenniferpeterson5152 5 лет назад +1

    Great tutorial! Thank you!!

  • @MrStanban
    @MrStanban 6 лет назад

    great video, really happy i found this video as it saved me a lot of trouble

  • @meromoro8673
    @meromoro8673 7 лет назад +1

    from egypt and follow u of c# ..
    thanks of videos learn

  • @hydenseek9390
    @hydenseek9390 6 лет назад

    Hey man Im new to Programming, Databases and other things related to it
    thankyou for making this video it helped me a lot kudos

  • @matheesanparamagnanam9283
    @matheesanparamagnanam9283 5 лет назад +1

    Thanks, You Help ME Lots Thanks For Your Help

  • @amolhase5249
    @amolhase5249 3 года назад

    Thank you sir it's very helpful video.

  • @macaroniz1425
    @macaroniz1425 4 года назад

    Thank you for the tutorial!

  • @ExoDus_110
    @ExoDus_110 5 лет назад +1

    Very Helpful Video ^-^

  • @ScottScreen
    @ScottScreen 6 лет назад

    This has been super helpful. Thanks so much!

  • @Fergunator
    @Fergunator 7 лет назад +1

    great tutorial, I forgot to update the Stored Procedure and my stuff was not updating hehe

  • @the007apocalypse
    @the007apocalypse 4 года назад

    Very helpful. Thank you

  • @starlightmm
    @starlightmm 3 года назад +1

    on @36:24 if we double click the blank datagridview after we run the program, its error, any idea how we not using if(dgvContacts.CurretnRow,Index != -1)? because
    on your example you click search to show the datagridview, but if we click blank datagridview after run the program, it error on that code above, Thank you for the great video :), this is most complete

    • @CodAffection
      @CodAffection  3 года назад +1

      Thanks for catching that.

    • @starlightmm
      @starlightmm 3 года назад

      @@CodAffection your welcome, but yes i still hoping the answer :D if you dont mind, thank you for great video

  • @cardgames7365
    @cardgames7365 4 года назад

    Thank you so much....
    Helped me a lot

  • @asmakacimi3815
    @asmakacimi3815 5 лет назад

    Thanks a lot for the help and information, good presentation

    • @CodAffection
      @CodAffection  4 года назад

      glad to see your comment. keep learning and sharing.

  • @nawodmadhuvantha9291
    @nawodmadhuvantha9291 5 лет назад

    thank you so much. awesome guidance

  • @ann_val
    @ann_val 7 лет назад +1

    Awesome! Thanks a lot!

  • @shovikanand3214
    @shovikanand3214 6 лет назад

    Best teacher u r..u discussed so nicely even simple things...best way u taught...so calmly ..wow ..best u r..may i know ur name sir.?

    • @CodAffection
      @CodAffection  6 лет назад +1

      Thanks for your wonderful feedback!.

    • @shovikanand3214
      @shovikanand3214 6 лет назад

      We need.more n more such videos to command c# dotnet sir...i need ur help personally

  • @nguyentaanh8672
    @nguyentaanh8672 4 года назад

    Love From Vietnam

  • @renzosanantonio5952
    @renzosanantonio5952 7 лет назад

    This is very helpful. Thanks a lot 😊😃😃

  • @alexpetruco1348
    @alexpetruco1348 3 года назад

    Great Man Thank you so much

  • @DonDensho
    @DonDensho 6 лет назад

    It was a lot of Help Thanks!

  • @melmarch8732
    @melmarch8732 5 лет назад

    Thanks so much :) Really helped me.

  • @prabhjotkaurprabh2411
    @prabhjotkaurprabh2411 6 лет назад +1

    Its really helpful.Sir i have created the database application but the forms does not open in full window mode. I need to maximize each form again and again. Please suggest something how can i make all forms in full window mode.

  • @SURESHSUTHAR78
    @SURESHSUTHAR78 6 лет назад

    Thank you very much...
    Its was very helpful..!!!

    • @CodAffection
      @CodAffection  6 лет назад

      My pleasure, Thanks for the comment.

  • @orlandoreyes884
    @orlandoreyes884 6 лет назад

    Excellent!! Very usefull

  • @justyn8899
    @justyn8899 5 лет назад

    THANK YOU SO MUCH YOU ARE MY HERO

  • @bunnieyeon7246
    @bunnieyeon7246 4 года назад +1

    Where does ContactName from stored procedures named contactviewor search came from

    • @zergiocunha
      @zergiocunha 3 года назад

      I m with this problem too

  • @zerosandones7547
    @zerosandones7547 3 года назад

    Hey, @18:44 why is your connection string's data source=.\SQLEXPRESS?
    mine is Data Source=(LocalDB)\MSSQLLocalDB;
    I already have sql server but why is my connection like that sir?

  • @jjtg27
    @jjtg27 7 лет назад

    just perfect, thanks a lot.

  • @saminachapagain957
    @saminachapagain957 7 лет назад

    thanks for the video...its very useful.plz add date and combobox too..

  • @rvsusi4046
    @rvsusi4046 6 лет назад

    Hai sir, this is really awesome and more easy to do and I have implemented it in my project it's working too good. Thank you so much sir. And I need a help from you sir because I am doing a school management project so that I need to include attendance process but I referred lot of videos still I didn't get apt full like this video. Please sir just upload a video of how to process attendance concept in Windows form using c# or suggest me some videos sir. It's urgent for me sir. Plsssss

    • @CodAffection
      @CodAffection  6 лет назад

      Thanks for the comment. Now I don't have a video for school management software.

  • @SallyJarkasM
    @SallyJarkasM 7 лет назад +1

    thank u so much
    it is helpful

    • @CodAffection
      @CodAffection  7 лет назад

      I'm glad you liked it, thanks for watching

  • @maherkoosa3190
    @maherkoosa3190 7 лет назад +1

    thank you very much :) :)

  • @SAIRICHITHAY_GACS
    @SAIRICHITHAY_GACS 3 года назад

    Pls help me out,not able to insert values....ur video helped a lot ,but not able to insert values

  • @miranmj2
    @miranmj2 Год назад

    hello mate, can you upload a video about how to upload a bulk of data to sql server from ms access in c# and also download a bulk of data from sql server to ms access file in c#

    • @CodAffection
      @CodAffection  Год назад

      an old video, it might help : ruclips.net/video/sBpNkjdRpno/видео.html

    • @miranmj2
      @miranmj2 Год назад

      @@CodAffection thanks a lot mate

  • @syedjamalrizvi3464
    @syedjamalrizvi3464 8 лет назад +1

    Thanks for this. Sir, Please add Radio button and combo box also .. Thanks in advance.

    • @CodAffection
      @CodAffection  8 лет назад +1

      sure

    • @CodAffection
      @CodAffection  7 лет назад

      try this new video : ruclips.net/video/1kT3KaZcNn8/видео.html

  • @zerosandones7547
    @zerosandones7547 3 года назад

    How do we deploy/publish this to the client machine?

  • @joaopedromendes3952
    @joaopedromendes3952 6 лет назад

    Any chance to get a way to check if name already exists? Rigth now its possible to have duplicated entries.

  • @mundodemaluehelo
    @mundodemaluehelo 8 лет назад +1

    thanksss so much!

  • @AshfaaqCurimbaccus
    @AshfaaqCurimbaccus 4 года назад

    how do you get the command : FILLDATAGRIDVIEW ???

  • @nanisorenightcore7436
    @nanisorenightcore7436 6 лет назад

    Hello ? can i ask why i don't have FillDataGridView in 32:28 thank you

  • @zergiocunha
    @zergiocunha 3 года назад

    Where are the ContactName, in 'search button'? i cant find him

  • @sisilanaledinga6822
    @sisilanaledinga6822 7 лет назад

    please help me on step by step working and introduction on C# form application

  • @yachiyow7210
    @yachiyow7210 8 лет назад

    thank you :)

  • @SSIFRupali
    @SSIFRupali Год назад

    I get error in stored procedure plzzz 😢
    AS line num 8 ?

  • @abdulqahar9852
    @abdulqahar9852 Год назад

    how to insert and update data in just one button(save) in C# // I need some help

  • @jimbrillantes2387
    @jimbrillantes2387 5 лет назад

    Values are not being saved in my database during the AddOrEdit procedure part. I followed everything, except it is not saving on the database

  • @skks911
    @skks911 4 года назад

    Load of property'RootNamespace 'failed. The string for the root namespace must be a valid identifier.
    Sir how can i solve this error

  • @cricfreaks1042
    @cricfreaks1042 5 лет назад +1

    Can anyone give me a solution to edit all data which is populated from the Data table(in database) to Datagridview and update the whole edited data into the same Data table .(Update query)

  • @ratkoskrbic9791
    @ratkoskrbic9791 7 лет назад

    Thanks for great video.
    I wanted to create column header with space: [Mobile Number] and I could not save the store procedure. If these two words are together, everything works fine. Can anyone help me?

    • @CodAffection
      @CodAffection  7 лет назад

      did you create a column with name 'Mobile Number' ? and now you have a problem with creating stored procedure right ?

    • @ratkoskrbic9791
      @ratkoskrbic9791 7 лет назад

      Yes, I did. Because there is space between these two words, during creation of column name, "Mobile Number" is automatically inserted between [ ]. And than I tried to use same content [Mobile Number] in stored procedure and there is error.

  • @lekSandraShine
    @lekSandraShine 7 лет назад

    This program deletes only first(0) person?

    • @CodAffection
      @CodAffection  7 лет назад

      yes ,only one person. person with given id.

    • @lekSandraShine
      @lekSandraShine 7 лет назад

      Dotnet Mob No, I am about first in index? Or i can choose with index 18 ?

  • @SAIRICHITHAY_GACS
    @SAIRICHITHAY_GACS 3 года назад

    Sir, not able to insert values

  • @karmaisreal9484
    @karmaisreal9484 6 лет назад

    How do i save the database

  • @tiny2700
    @tiny2700 6 лет назад

    Hello. Everything works fine except that it only allows me to save one record in the table. After that I receive an error about duplicate primary key. Please note that I did download the project and I adapted it to my project. If you have any suggestions on solving this, please reply. Thanks

    • @CodAffection
      @CodAffection  6 лет назад

      did you set the id column as identity column - in video it was there at 10:30

    • @tiny2700
      @tiny2700 6 лет назад

      yup. here is the syntax
      CREATE TABLE [dbo].[train_lines] (
      [Id_TL] INT IDENTITY (1, 1) NOT NULL,
      [tl_name] VARCHAR (50) NOT NULL,
      PRIMARY KEY CLUSTERED ([Id_TL] ASC),
      );

    • @tiny2700
      @tiny2700 6 лет назад

      Ah, found the problem. In the Add stored procedure I had:
      IF @mode = 'LJ_Add'
      BEGIN
      INSERT INTO train_lines
      (Id_TL, tl_name)
      VALUES
      (@Id_TL,@tl_name);
      END
      I deleted the Id_TL from insert and values and now it works fine. Thank you for replying anyway.
      That's how it happens usually, as soon as you ask for help, you find the problem :))

  • @przemekotczyk8946
    @przemekotczyk8946 8 лет назад

    Can you help me ? I have a problem when I run the program, after double click on the DataGridView I see the error:
    An unhandled exception of type 'System.FormatException' occurred in mscorlib.dll
    this corresponds to:
    CONTACTID = Convert.ToInt32 (dgvContacts.CurrentRow.Cells [0] .Value.ToString ());
    How can I convert it?
    ContactID in my SQL as an integer

    • @CodAffection
      @CodAffection  8 лет назад

      Przemek Otczyk can u put a break point in double click event then find out the exact line that cause the exception

  • @ganapathivaideeswaran9098
    @ganapathivaideeswaran9098 2 года назад

    Where is the code to download please ?

  • @jocomitsu
    @jocomitsu 7 лет назад

    when search is can't find the item it errors...

  • @florindanci4581
    @florindanci4581 7 лет назад

    Why whatever I do, It gives me an exception saying "stored procedures not found"...When I save it, I have to choose where, when you did, you did not have to choose..

    • @CodAffection
      @CodAffection  7 лет назад

      ruclips.net/video/-2UcDV4uUu8/видео.htmlm34s

    • @CodAffection
      @CodAffection  7 лет назад

      Pass your stored procedure name as parameter to SqlCommand. I hope you have downloaded the source code.

  • @aamishirfan3334
    @aamishirfan3334 6 лет назад

    Error cannot insert the value NULL into column 'ContactId'

  • @samueld.yapjr.3270
    @samueld.yapjr.3270 7 лет назад +1

    hi there @Dotnet Mob, i got stuck in the situation where in if i click the record and wont proceed on the edit..then if i click the reset button and enter supposedly a new record..it wont save as new..instead it will show the update message thus updates the last clicked record instead of making a new one..i hardly need help..tnx!

    • @CodAffection
      @CodAffection  7 лет назад +1

      Sure, Please put a breakpoint in datagridview row click event and then run. let me check in my side.and it is a double click event not a click event.

    • @CodAffection
      @CodAffection  7 лет назад +1

      let me know if you need more clarification.

    • @samueld.yapjr.3270
      @samueld.yapjr.3270 7 лет назад

      yes i do man..the if else loop wont work..it wont read if button text is "save" or "update"
      when i run the project..it perfectly saves every data..after each saving..but when i click the table to update a record..after that if i click reset..the new datas will no longer be save..it will show as update..

    • @samueld.yapjr.3270
      @samueld.yapjr.3270 7 лет назад

      yes it was set as doubleclick as well here in my end

  • @azizkarami5067
    @azizkarami5067 6 лет назад

    Could not find stored procedure please i need a help in this error

  • @BassNoiseAmplifier
    @BassNoiseAmplifier 6 лет назад

    Hi, i just have one problem, when i update one contact it updates all other contacts with the same information

  • @nidhichoraria5624
    @nidhichoraria5624 6 лет назад

    Thanks for this but my delete button is not supporting

  • @vinaykumar_namadi
    @vinaykumar_namadi 7 лет назад

    Its working fine in my PC, but unable to run in another PC. I am getting instance specific error related to database, plz help.

    • @CodAffection
      @CodAffection  7 лет назад

      try this stackoverflow.com/questions/11278114/enable-remote-connections-for-sql-server-express-2012

  • @rahathossain4346
    @rahathossain4346 7 лет назад

    how to work in search ber option ????

    • @CodAffection
      @CodAffection  7 лет назад

      search text box is used to filter records from inserted records. it is already implemented in this project.

    • @rahathossain4346
      @rahathossain4346 7 лет назад

      ohh..thanks for your informative reply

  • @nowelexnhuh824
    @nowelexnhuh824 6 лет назад

    where is the sql file of this project?

  • @wardahnadeem2368
    @wardahnadeem2368 7 лет назад

    i'm having a problem with delete and update button .
    like if I update a data it does not update in grid view or table and same with delete button
    and filldatagridview function is not available in my c# library it does not exist in the current content

    • @CodAffection
      @CodAffection  7 лет назад

      did you download demo project source code ?

    • @wardahnadeem2368
      @wardahnadeem2368 7 лет назад

      Dotnet Mob No I didn't

    • @CodAffection
      @CodAffection  7 лет назад

      please download demo project and try.

    • @wardahnadeem2368
      @wardahnadeem2368 7 лет назад

      Dotnet Mob thank you
      it helped alot :)
      Can please guide where I can find sale system ? with this procedure?
      I have a project to submit tomorrow and I can't find it :(

    • @CodAffection
      @CodAffection  7 лет назад

      I didn't get you. What project ? Let me know project requirements.

  • @alaasawaftah7704
    @alaasawaftah7704 8 лет назад

    How can i import file sql into program?

  • @BM12121
    @BM12121 7 лет назад

    if (dataGridView1.CurrentRow.Index i= -1), i am having trouble with this line, what am i doing wrong?

  • @egeucoklar1410
    @egeucoklar1410 6 лет назад

    How to make gridView get the search results simply by typing a letter in a textbox without pressing any SEARCH button?

    • @CodAffection
      @CodAffection  6 лет назад

      Implement keypress event on textbox instead of search button click event.

  • @ukaszjabonski9389
    @ukaszjabonski9389 7 лет назад

    Hi, I have got error "Could not find stored procedure" I'm using VS 2017 and i can't type sqlCmd.CommandType = CommandType.StoredProcedure; VS says i need to do like this sqlCmd.CommandType = System.Data.CommandType.StoredProcedure;. i think this is a problem but i don't know solution

    • @CodAffection
      @CodAffection  7 лет назад

      use required namespace.
      add following namespace
      using System.Data;

  • @syedtahirrazanaqvi7983
    @syedtahirrazanaqvi7983 6 лет назад

    dgvContacts.DataSource = dtbl
    It is giving me an error call "dgv does not exist in the current context" what can i do for that??? Am I use any packages or something??? please help me to sort out my problem...

    • @CodAffection
      @CodAffection  6 лет назад

      dgv ? what is the name of datagridview dgvContacts or dgv ? try to run in debug mode.

  • @amanullahwesal2594
    @amanullahwesal2594 7 лет назад

    how to create setup from project

    • @CodAffection
      @CodAffection  7 лет назад

      you can expect that in upcoming tutorials

    • @CodAffection
      @CodAffection  7 лет назад

      Video As Per Your Request.
      ruclips.net/video/tiHBwAp_Kz4/видео.html

  • @jeromekentbayubay
    @jeromekentbayubay 8 лет назад

    Can you help me? I just did what your tutorials but I keep receiving this error "Cannot insert explicit value for Identity column in table 'EMPLOYEES' when IDENTITY_INSERT is set to OFF" can you help me about this pls?

    • @CodAffection
      @CodAffection  8 лет назад +1

      sure,
      fix : in the insert sql script - avoid employee id column(identity column)
      reason : you can't insert values into identity column directly
      I hope you downloaded my project from the link given in video description

    • @jeromekentbayubay
      @jeromekentbayubay 8 лет назад

      Thanks for the reply I'll try it later and I will tell you the result later.. Nice channel by the way nice to subscribe..

    • @jeromekentbayubay
      @jeromekentbayubay 8 лет назад

      sir I'm sorry I am really a beginner with C# I just download the link from your videos description and just follow the ID column that you made with primary key and now I'am confuse... sorry for disturbing you... but can you help me understand about this.. I mean I understand your C# tutorials but I dont know what happened with my sql syntax...

    • @CodAffection
      @CodAffection  8 лет назад

      can i see you stored procedure for employee insertion ?
      if possible please share the table design also

    • @jeromekentbayubay
      @jeromekentbayubay 8 лет назад

      yes sir where could I share it to you?

  • @NTDairy
    @NTDairy 2 года назад

    love you

  • @esebacamacwindows
    @esebacamacwindows 6 лет назад

    How can I transfer this application to another computer without having problems? I get problems with LocalDB and then the attachment database etc .. how can I solve? I just want to make the application work like your video on another computer without having to install special programs. Please help me it's been 4 days since I can not solve the problem. Thanks in advance.

    • @CodAffection
      @CodAffection  6 лет назад

      I hope you have installed MS SQL Server on new computer, Then you may need to change Db connection string. Please watch this video for building connection string : ruclips.net/video/WJ-CdeTGxp8/видео.html

    • @esebacamacwindows
      @esebacamacwindows 6 лет назад

      On the new computer I do not have MS SQL Server. Can you send me the link where to download MS SQL SERVER to the new computer and which edition? I can not understand what the right link is.

  • @khanfalaknaaz846
    @khanfalaknaaz846 5 лет назад

    Lovey super

  • @alpercalisirold
    @alpercalisirold 7 лет назад

    When i press search i don't see the whole table.Anyone knows why ?

    • @CodAffection
      @CodAffection  7 лет назад

      whole table ? empty datagridview ?

  • @tuananhvo3175
    @tuananhvo3175 6 лет назад

    Search?

  • @virusaki
    @virusaki 8 лет назад +1

    error: an attempt to attach an auto-named database for file...

  • @farjanasurjo4538
    @farjanasurjo4538 6 лет назад

    dgvContacts.DataSource = dt;
    Error : Error 1 The name 'dgvContacts' does not exist in the current context
    plz help me

    • @CodAffection
      @CodAffection  6 лет назад

      please download the demo project and compare with yours.

  • @builditontutorial
    @builditontutorial 5 лет назад +1

    8:24

  • @karmaisreal9484
    @karmaisreal9484 6 лет назад

    or the table thingy

  • @artbelief777
    @artbelief777 5 лет назад

    dgvContacts where it is

  • @RashidAli-oc6yl
    @RashidAli-oc6yl 6 лет назад

    KIND SOURCE code b de dain

    • @CodAffection
      @CodAffection  6 лет назад

      I think, it's there in video description.

  • @Angelrose-ig
    @Angelrose-ig 8 лет назад

    please send me source code of this?

    • @CodAffection
      @CodAffection  8 лет назад

      you can download the source code from the link given in video description.if you need any help let me know

    • @Angelrose-ig
      @Angelrose-ig 8 лет назад

      where is link.?

    • @CodAffection
      @CodAffection  8 лет назад

      www.dropbox.com/s/6kft17y18hp5ng0/Save%20Update%20Delete%20View.zip?dl=0

  • @rylramos9261
    @rylramos9261 5 лет назад

    Basic approach, Improve

  • @carrascoolveramiguelangel7517
    @carrascoolveramiguelangel7517 8 лет назад

    It is does't work

    • @carrascoolveramiguelangel7517
      @carrascoolveramiguelangel7517 8 лет назад

      :(

    • @CodAffection
      @CodAffection  8 лет назад

      did you download the project ? any error message ?

    • @carrascoolveramiguelangel7517
      @carrascoolveramiguelangel7517 8 лет назад

      I downloaded the software but I did exactly same that you, and visual studio shows me :" An attempt to attach an auto named database for file C:\Users\MyUser\Documents\BD_CONTACTAPP\ContactDB.mdf failes. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share"

    • @carrascoolveramiguelangel7517
      @carrascoolveramiguelangel7517 8 лет назад

      thanks, I have found the answer !!! the issue is in my directory, vs had a big bug!!!

    • @CodAffection
      @CodAffection  8 лет назад +1

      thank you very much for watching my video,
      next time I will make a separate video on how to use demo project source code and db script

  • @learningchannel3362
    @learningchannel3362 7 лет назад

    lol

  • @furtunaaaaa
    @furtunaaaaa 7 лет назад

    2trigered mic!!!!!!11

  • @stefankukec9613
    @stefankukec9613 6 лет назад

    Rrrrigt

  • @moklumikluy2227
    @moklumikluy2227 6 лет назад

    GGWP