|
Posted by Hugo Kornelis on 07/11/06 20:25
On Tue, 11 Jul 2006 14:22:00 +0200, R.A.M. wrote:
>On Tue, 11 Jul 2006 00:18:29 +0200, Hugo Kornelis
><hugo@perFact.REMOVETHIS.info.INVALID> wrote:
>
>>On Mon, 10 Jul 2006 20:38:44 +0200, R.A.M. wrote:
>>
>>>Hi,
>>>I am learning SQL Server 2005. I need to call .NET assembly procedure
>>>from T-SQL.
>>>Here's part of my assembly:
>>(snip)
>>>I have created assembly in Object Explorer (Programmability /
>>>Assemblies).
>>
>>Hi RAM,
>>
>>How did your CREATE ASSEMBLY statement look? Can you post it?
>
>I scripted:
>
>CREATE ASSEMBLY [DemoSQLServer]
>AUTHORIZATION [dbo]
>FROM ...
>WITH PERMISSION_SET = SAFE
Hi RAM,
Thanks. Unfortunately, I now realise that I forgot to ask to post the
CREATE PROCEDURE statement you used as well - my apologies.
To cut this short, I'll just post my assumption: I _think_ that yoru
CREATE PROCEDURE statement looks like this:
CREATE PROCEDURE [PodajKsi¹¿ki]
AS
EXTERNAL NAME DemoSQLServer.[DemoSQLServer.Demo].[PodajKsi¹¿ki]
go
If this is indeed hoow yoou created the stored procedure, then you use
the following syntax to call it:
EXEC [PodajKsi¹¿ki]
(or, if you want to follow best practice and explicitly add the schema:
EXEC dbo.[PodajKsi¹¿ki] - but of course, then you'd add an explicit
schema on the various CREATE statements as well).
(Note - I used copy and paste for the procedure name since some of the
characters appear to be from a character set that's not installed on my
computer - I hope the procedure name looks right to you!)
(Second note - I chose safety first and enclosed the stored procedure's
name between bracktes, since I don't know if the actual characters that
look like ¹¿ on my computer are valid or not in an identifier. You can
always try to use PodajKsi¹¿ki instead of [PodajKsi¹¿ki]).
--
Hugo Kornelis, SQL Server MVP
[Back to original message]
|