Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
This course investigates several key database-programming concepts: triggers, stored procedures, functions, and .NET CLR (Common Language Runtime) assemblies. Author Martin Guidry shows how to combine these techniques and create a high-quality database using Microsoft SQL Server 2012. The course also covers real-world uses of the INSERT, UPDATE, and DELETE procedures, and how to build a basic web form to connect to your database.
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.
There are currently no FAQs about SQL Server: Triggers, Stored Procedures, and Functions.
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.