Posted by R.A.M. on 10/02/24 11:52
Hi,
I am learning SQL Server 2005. I need to call .NET assembly procedure
from T-SQL.
Here's part of my assembly:
using System;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
namespace DemoSQLServer
{
public sealed class Demo
{
[SqlProcedure(Name="PodajKsi¹¿ki")]
public static void PodajKsi¹¿ki()
{
SqlCommand cmd = new SqlCommand("SELECT * FROM Ksi¹¿ki");
SqlDataReader dr = cmd.ExecuteReader();
SqlContext.Pipe.Send(dr);
}
...
}
}
I have created assembly in Object Explorer (Programmability /
Assemblies).
How to call procedure? I tried:
exec DemoSQLServer.PodajKsi¹¿ki
but I got a message:
Could not find stored procedure 'DemoSQLServer.PodajKsi¹¿ki'.
Please help.
Thank you.
/RAM/
[Back to original message]
|