Join Martin Guidry for an in-depth discussion in this video Writing stored procedures with C# .NET, part of SQL Server: Triggers, Stored Procedures, and Functions.
Now we're going to write some C# code that will eventually become a stored procedure.…We'll start off by create a new project in Visual Studio.…For the project type I want it to be a Class Library.…The result of a Class Library is a DLL and we will import that DLL into SQL Server.…We'll name our Class Library CLRtest.…Rather than use of the default class they have, I'll create a new class.…
And I'll call the class mySprocs.…The machine automatically wrote some code for me.…Some of it I want, some of it I don't want, and I'll keep the using statements,…but I'll also need to add a few of my own using statements, because we're…working with a database, we will need to add using system.Data.…We will also need to add using system. Data.SqlClient and system.Data.SqlTypes.…
One more with the Microsoft.SqlServer.Server.…So that should be all the using statements we need.…I said I'd call myClass mySprocs.…It'll need to be marked as a public class, and inside of that a class for now…we're only going to have one method.…
- Comparing triggers, functions, and stored procedures
- Installing and configuring SQL Server
- Creating a stored procedure
- Returning data using data sets
- Creating user-defined functions
- Using "after," "instead," and nested triggers
- Modifying existing stored procedures
- Implementing logging on DELETE
- Choosing between T-SQL and CLR
- Executing a stored procedure
- Passing parameters
Skill Level Advanced
1. Getting Started
2. Installing SQL Server
Configuring your environment4m 53s
3. Stored Procedures
4. User-Defined Functions
6. Putting It All Together
7. Using CLR Assemblies
8. Exploring an ASP.NET Web Application
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.