You must Sign In to post a response.
  • Category: .NET

    How to call c# or Javascript function in SQl Server

    Hello Sir/Madam

    Can you please suggest , is there any way to call a javascript or C# function call in Sql Server .

    Bhavik Shah
  • #766096
    You can call C# functions from SQL Server Stored Procedure with the help of CLR(Common Language Runtime) SP.
    Please refer this URL:

  • #766115
    SQL Server 2005 supports CLR so it means we can use CLR in backend so how to do that. let's see.
    Yes, it is possible to use .NET in a SQL Server 2005 database. and .Net framework 2.0 and above.
    MSDN says,
    Create a SQL user-defined function by adding a User-Defined Function to a SQL Server project. After successful deployment, the user-defined function can be called and executed.
    see below links

    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #766140
    1. For do this you have to create "SQL Server Project"
    2. You have to use [Microsoft.SqlServer.Server.SqlProcedure] for methods.
    3. You can run the C# project directly in the your query analyser.
    EXEC <SQL Project>

    By Nathan
    Direction is important than speed

  • Sign In to post your comments