Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now I would like to talk about a very different technique of creating stored procedures and functions. I will create some stored procedures using the .NET framework languages. In the demos I'll focus on C# which is certainly the most popular language, but we can also use any of the hundreds of .NET languages C#, VB.NET, F#, J# IronPython, IronRuby, and many others. It is possible to write a stored procedure at the .NET framework, because both the .NET framework and SQL Server are heavily integrated with the Common Language Runtime, commonly called the CLR.
However, not every version of the CLR is compatible with every other version. So here on the screen I have a chart showing some of the compatibility levels. SQL Server 2005 and 2008 is compatible with the CLR versions 2.0, 3.0, and 3.5. And SQL Server 2012 we still get 2.0, 3.0, 3.5, but we also additionally get 4.0. This can lead to some interesting decisions for a developer as to which version should you write your code in.
But in many cases it's not that hard to change what version you're an after the fact. Inside of Visual Studio you can right- click on any project, go to Properties, and you'll see one of the dropdowns is Target framework. Here it's been selected to the 4.0. It would be very easy to change this to 2.0, 3.0, 3.5. Obviously, there are a few features that are limited to a specific version of the framework and we can have some compatibility issues.
But the majority of your code will work with any version of the .NET framework and it's very easy to change right here.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 97308 Viewers
61 Video lessons · 84566 Viewers
71 Video lessons · 68772 Viewers
56 Video lessons · 101255 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.