You are here: 2005: calling .NET procedure « MsSQL Server « IT news, forums, messages
2005: calling .NET procedure

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация