Using CLR Stored Procedures

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

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

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

    Good job

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

    Hi, I am working on a project and there I need date code for example if it is 2017/10/11 then the code should appear 7XB(7 is year 17 and X is month oct and B is day 11) and this is connected with part number if part number is same then 7XB should increment by 1 like 7XB1. I have all the months and day code but don’t know how to use it to generate these code and sequence in SQL server and also I can save in database. is there any way to write a query in sql which can decode the date if part number match with the given date.
    And the same thing I need to do in VB.net creating a windows application.In that when I give the part number and date it should decode the date and print the label and save the decoded date and sequence in the database.
    Please help me I am new to sql and VB.net
    Thanks in Advance!

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

    and this is why now I'm stuck trying to debug complex CLRs that some smart alec wrote and then left the company.
    Do they work? yes. but if there's something wrong with the code inside, debugging is an absolute nightmare.
    We use SSIS, but rather than to call a stupid CLR, I would much rather put my C# code inside a script task and have the option of stepping through it.
    I don't know if there's any way to step through CLR code, but I doubt it.

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

      No SSMS cannot be used to debug the C# code. What you need to do it debug the C# .DLL using a simple test harness. You can also use ildasm.exe to get at the code in the dll file if they did not leave you the source code. Using a SSIS script task is much easier, but a bit more restrictive if you want to share the same business logic between multiple apps, like the same validations between the web server and the database. If they are set up correctly, they can be easy to test and customize, but that seldom seems to happen.
      Still, often people pick tools because they look cool when a simpler one would be better. In my mind it's nice to about options like CLR sprocs, but I do recommend keeping things simple whenever we can. Good luck with dealing with the legacy code. I know it is almost always a pain. :-(

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

    crap