MS SQL Server
  Home arrow MS SQL Server arrow .NET CLR Programming with SQL Server 2005 ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MS SQL SERVER

.NET CLR Programming with SQL Server 2005 Made Simple
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 14
    2006-08-30

    Table of Contents:
  • .NET CLR Programming with SQL Server 2005 Made Simple
  • .NET CLR stored procedure in SQL Server 2005 database: creation
  • .NET CLR stored procedure in SQL Server 2005 database: Coding
  • .NET CLR stored procedure in SQL Server 2005 database: Testing
  • .NET CLR user-defined function in SQL Server 2005 database
  • .NET CLR user-defined aggregate in SQL Server 2005 database

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    .NET CLR Programming with SQL Server 2005 Made Simple


    (Page 1 of 6 )

    This article explains how to create .NET based CLR sub-routines in SQL Server 2005 in the simplest way possible. It is mainly targeted at .NET developers who want to work with SQL Server 2005 at server side.
    A downloadable file for this article is available here.

    The following are the topics covered in this article:

    • Creating a new database, table and a few rows.
    • Creating, coding and testing a .NET CLR stored procedure.
    • Creating, coding and testing a .NET CLR user-defined function.
    • Creating, coding and testing a .NET CLR aggregate function.

    The entire source code for this contribution is freely available for download.

    Creating your own database in SQL Server 2005

    This section mainly covers the creation of a database and tables to be used in this series. Go through the following steps:

    • Go to Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management Studio and connect to your SQL Server 2005 instance with the necessary credentials.
    • Once connected, open the SQL Server 2005 instance using the “Object Explorer," right click on “databases” and select “New Database” (Fig 1).

    You will be presented with the “New Database” dialog.  Provide the database name “Sample” and click on “OK” to create the new database within the same instance.

    • Once the database is created, you must be able to watch the same in “Object explorer.”
    • Using the “Object explorer,” open “Sample” database, right click on “tables”   and select “new table" (Fig. 2). 
       
    • Create the structure of the table as shown in the following figure
      (Fig 3) and save the table with the name “emp.”


    • Once you have created the table “emp,” open it (Fig 4) and fill with rows as shown (Fig 5). 
       

        

    More MS SQL Server Articles
    More By Jagadish Chaterjee


       · Hello guys! This is a simple all-in-one contribution in dealing with .NET CLR...
     

    MS SQL SERVER ARTICLES

    - Completing the Introduction to Transact-SQL
    - A Brief Introduction to Transact-SQL
    - Lookups and Blocking Bad Data
    - Field Validation Rules for Blocking Bad Data
    - Using Masks to Block Bad Data
    - Blocking Bad Data
    - Using @@ROWCOUNT and TABLE Variables for Dat...
    - How to Use Variables, IF and CASE in Databas...
    - Creating Important Aspects of Notification S...
    - Working wth Variables in Database Interactio...
    - Delving Deeper into Notification Services
    - Notification Services
    - Building a Multi-table Report with SQL 2005 ...
    - A Secure Way of Building Connection Strings
    - Transferring a Database Using the SSIS Desig...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway