Home > Archive > MS SQL XML > October 2005 > Specifying typed xml parameter in CLR stored procedure









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Specifying typed xml parameter in CLR stored procedure
Sergei Almazov

2005-10-27, 9:26 am

Is there any way to specify the XML schema for SqlXml parameter in the CLR
stored procedure so that it will be correctly deployed to SQL Server? Ideally
it would be something like that:

[Microsoft.SqlServer.Server.SqlProcedure(Name = "usp_GetData")]
public static void GetData(
[Microsoft.SqlServer.Server. SqlParameter(Declara
tion = "@xml xml
(MySchemaCollection)
")]
SqlXml xml)
{
//Do something
}

Bob Beauchemin

2005-10-27, 9:26 am

Not that I'm aware of with autodeploy and attributes. You can do this by
manually specifying the schema collection for the parameters in CREATE
PROCEDURE in DDL.

Bob Beauchemin
http://www.SQLskills.com/blogs/bobb


"Sergei Almazov" <Sergei Almazov@discussions.microsoft.com> wrote in message
news:F1DAB0CC-1485-437C-ACDB- AB010DDC0B68@microso
ft.com...
> Is there any way to specify the XML schema for SqlXml parameter in the CLR
> stored procedure so that it will be correctly deployed to SQL Server?
> Ideally
> it would be something like that:
>
> [Microsoft.SqlServer.Server.SqlProcedure(Name = "usp_GetData")]
> public static void GetData(
> [Microsoft.SqlServer.Server. SqlParameter(Declara
tion = "@xml xml
> (MySchemaCollection)
")]
> SqlXml xml)
> {
> //Do something
> }
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com