Error handling in sql server 2000 Part 55

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

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

  • @saikrishna-sv6gw
    @saikrishna-sv6gw 9 лет назад +40

    I've followed all your tutorials and you are excellent!!! The only thing that comes to my mind is how many valuable hours,days & months you've spent to provide these marvelous tutorials expecting nothing in return. You have a wonderful & blessed life ahead SIR. Thank you so much and your deeds are highly appreciated

    • @Csharp-video-tutorialsBlogspot
      @Csharp-video-tutorialsBlogspot  9 лет назад +19

      +sai krishna Thank you very much for taking time to give feedback Sai. This means a lot. I am very glad you found the videos useful.
      I have organised all the Dot Net & SQL Server videos in to playlists, which could be useful to you
      ruclips.net/user/kudvenkatplaylists?view=1&sort=dd
      If you need DVDs or to download all the videos for offline viewing please visit
      www.pragimtech.com/kudvenkat_dvd.aspx
      Slides and Text Version of the videos can be found on my blog
      csharp-video-tutorials.blogspot.com
      Tips to effectively use my youtube channel.
      ruclips.net/video/y780MwhY70s/видео.html
      If you want to receive email alerts, when new videos are uploaded, please subscribe to my youtube channel.
      ruclips.net/user/kudvenkat
      If you like these videos, please click on the THUMBS UP button below the video.
      May I ask you for a favor. I want these tutorials to be helpful for as many people as possible. Please share the link with your friends and family who you think would also benefit from them.
      Good Luck
      Venkat

  • @Csharp-video-tutorialsBlogspot
    @Csharp-video-tutorialsBlogspot  11 лет назад +1

    The quality of the video depends on your internet connection bandwidth. All the videos are uploaded in HD quality. To improve the video quality, click the settings button that is present at the lower bottom right hand corner of the youtube player. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends.

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

    I a so happy that I've found your channel. You explanation so clear , even for person that doesnt have any knowledge at sql. Thank you very much for your work.

  • @joshw3555
    @joshw3555 9 лет назад +7

    This man is a legend!

  • @krzysztofs8535
    @krzysztofs8535 8 лет назад +4

    Thank you Sir for these videos. It was not easy to prepare this course, it's on the highest level. U are great teacher , my greatest admiration!

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

    I must confess: you have nice tutorials here. I will make sure I start the tutorials from part 1 till the end.

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

    The cleanest language you have, sir. Love your videos

  • @phaobi
    @phaobi 9 лет назад +3

    Thank You Endlessly Dearest,Most Respected and perfect child of your great God Sir Venkat for all your Great Videos Series.
    Your ways of Demonstrations, illustrations and tutor are just simply Greatest of the Great. You are Blessed by Thousands and thousands of people. You are One of the God's Gift directly sent from Heaven to mankind. God Bless you for all Eternity...!!! Have a Great Day to You Forever and Ever.

  • @sureshrajput5794
    @sureshrajput5794 9 лет назад +1

    awesome video sir finally understood the actual use of error handling thanku very much venket sir :)

  • @zeroxx131
    @zeroxx131 11 лет назад

    Wow so straight forward. Your videos are excellent!!

  • @sravanasandhya95
    @sravanasandhya95 11 лет назад +1

    hi venkat sir really helpfull fr me sir...your videos are pretty simple to understand sir and i like your way of teaching sir..plz can you explain the WPF,WCF topics sir..its really helpful fr me sir ...thanks..great job ..

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

    Very informative. Keep up d good work

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

    Thanks Kudvenkat for the excellent tutorial

  • @krismaly6300
    @krismaly6300 9 лет назад

    Revisiting
    Thanks for educating the community.
    Thanks a lot

  • @s.e.kuzhali7014
    @s.e.kuzhali7014 9 лет назад +4

    Sir, your videos are wonderful and good.Can you please say me where can I get good training questions and solutions for SQL programming.. As I have learnt the basis, I need to get trained on the complex queries.

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

    You are great... Sir

  • @vivektarab1959
    @vivektarab1959 2 месяца назад

    0:25 - Introduction of PLSQL Codes

  • @lajapathyarun4329
    @lajapathyarun4329 11 лет назад

    Great post, i will like your every post.

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

    Thanks for your knowledge sharing.. thanks a lot sir .

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

    Please I have a question, what if the second statement raises an error as well, how do we handle that e.g. we replace 'select * from products' with another insert or update statement that can generate violation?

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

    Could you just set the Primary key column of the second table to be identity (autoincremented)?
    PS: This may be your best tutorial yet. Not only you explain error handling, but you present an interesting issue solution with sophisticated script.

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

      Thats what i was thinking, its a very long winded method.

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

      I am getting error if I autoincremented

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

      I am getting error if I autoincremented

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

    This is interesting. However, couldn't you have the sales id column be auto increment? Also, in a real world environment, wouldn't it be that if you have 90 on hand, you sell 100, the on hand qty would become 0 and you'd back order 10? In this case, you'd have a third table for the back ordered items.

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

    @Venkat, shouldn't we use auto increment for 'productSalesId' column ?
    if we use the method as shown in video. what happens when say the same procedure is triggered from two different end points ?

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

      He is not auto-incrementing just for the sake of explanation. He is trying to create the error easily to explain the concept.

  • @hageadan
    @hageadan 9 лет назад +4

    Why can't we use identity on the ProductSalesID in tblProductSales ?

    • @andrewmclaughlin2679
      @andrewmclaughlin2679 7 лет назад +3

      Identity is automatic when specified in the initial table. It is left out on purpose to demonstrate an error. Specifically, to demonstrate the first portion of the stored procedure works, reducing the quantity available, but not recording the transaction of the sale. This is inconsistent, and one of the reasons for using Error Handling in the first place. Notice the end of the stored procedure declares and inserts @MaxProductSalesID. If we used Identity in tblProductSales, we would be able to avoid declaring the final variable. But then, there would be no error, and so there would be no lesson for the video to demonstrate.

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

    Sir thank you so much for explaining the same in such a marvelous way.... I just want to know that do you have any paid online sessions of SQL Server too where you have provided even further details for SQL Server? If yes how to access the same kindly let me know please.....

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

    first of all I wanna say thank u very much, you`re my fav teacher. what I wanna know if my ID column is set to automatically calculated (identity, 100,1 - beginning from 100 and increasing by one) do I still need that clause? coz as I understood, it is only because when you manually enter the iD

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

      If he uses @identity then what's the topic error handing wouldn't be arised..

  • @bizzar31
    @bizzar31 11 лет назад

    you really gone that far ;)

  • @sksaratchandra8266
    @sksaratchandra8266 5 месяцев назад

    Thanks Sir ❤

  • @pasito287
    @pasito287 5 месяцев назад

    very useful

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

    I worship you, IT god!

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

    Thank you sir for your valuable post

  • @haiderhassan130
    @haiderhassan130 Месяц назад

    instead of calculating the ID in tblproductsales, shouldn't we just use identity (1,1) in the first place so that it automatically inserts after the previous ID?

  • @surajk508
    @surajk508 Месяц назад

    The Videos are excellent . I just have one Basic Question . Why 'Declare' key word is used to Declare '@Stockavailable' Variable but not used for @ProductID Variable . Thanks in advance

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

    Thank you Sir.

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

    How the control is going to the next statement after insert statement if there isn't error in insert statement. My question is how control is going to if statement if there is an error in insert statement.

  • @shamsunnahar9745
    @shamsunnahar9745 10 лет назад

    On Product sales table name of column does not match with insert command. On insert command it is @maxproductsalesid,@productid, qunatity to sell but after execution it came productsaleid, product id and qunatity sold. Could you kindly explain?

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

    Thank you for this wonderful video. I just wrote another print statement inside the @@error0 statement to see the value of @@error. It is showing the value as 0 only. Can you please help

  • @stutitehri993
    @stutitehri993 10 лет назад +1

    great

  • @Vij2011
    @Vij2011 10 лет назад

    gud and nice

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

    I followed your tutorial and tried to run the below statement.
    declare @error int
    insert into tblproductsales values(5,5,10)
    set @error=@@ERROR
    select *from tblproductsales
    if (@@ERROR0)
    Print 'Error Occurred'
    Else
    Print 'No errors'
    But I'm not getting Error Occurred msg instead it's executing else statement.
    Msg 2627, Level 14, State 1, Line 728
    Violation of PRIMARY KEY constraint 'PK__tblprodu__1B97317E93C37F32'. Cannot insert duplicate key in object 'dbo.tblproductsales'. The duplicate key value is (5).
    The statement has been terminated.
    (5 rows affected)
    No errors

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

    Am not getting error. Ram is not there. i want to make an error and print Transaction rolled back.
    Declare @Error int
    insert into tblEmployee values('Mobile Phone',1500, 100,'ram')
    if(@@ERROR 0)
    Begin
    print 'Transaction rolled back'
    End
    else
    Begin
    print 'Transaction Commited'
    End

  • @harshsharma-fp3xi
    @harshsharma-fp3xi 4 года назад

    @@ error understood

  • @DipakKumar-yl5vh
    @DipakKumar-yl5vh 2 года назад

    I am getting Error while creating the Stored Procedure, could anyone pls help me out

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

    What is "Begin Trans" & "Commit Trans"?

  • @ya0004ng
    @ya0004ng 10 лет назад

    excellent explanation

  • @hakeemsanni9935
    @hakeemsanni9935 10 лет назад

    kudvenkat Just curious, is there any good why not use RAISEERROR instead of @@Error in the insert statement.
    Thanks

    • @hakeemsanni9935
      @hakeemsanni9935 10 лет назад

      Tuomo Kämäräinen thanks, makes sense then

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

    plz change your PRONUNCIATION!!!!!!!!!!

  • @krismaly6300
    @krismaly6300 9 лет назад +1

    Revisiting
    Thanks for educating the community.
    Thanks a lot