Hi,

C# / .NET Framework 1.1

I would like to query extended stored procedure like stored procedure...
However, I found that CommandType property does not have Extended Stored
Procedure value.....

I tried something like..

SqlConnection con = new SqlConnection(....);
SqlCommand command = new SqlCommand('xp_blahblahblah", con);
command.CommandType = CommandType.StoredProcedure;
.....
...
command.ExecuteScalar();

However, it always throw exception saying "Could not find store procedure
xp_blahblahblah"....
Is there any way I can use the extended stored procedure programatically?

Thanks.

..................................................................TJ

Re: Programatically call extended stored procedure? by Scott

Scott
Wed Jun 07 18:30:50 CDT 2006

Its been .. wow, 8 years since I've dealt with XPs, but if I remember
correctly, what you need to do is wrap your XP with a standard/normal
stored proc.

hth,
Scott "Cmdr. Beavis" F.

TJ wrote:
> Hi,
>
> C# / .NET Framework 1.1
>
> I would like to query extended stored procedure like stored procedure...
> However, I found that CommandType property does not have Extended Stored
> Procedure value.....
>
> I tried something like..
>
> SqlConnection con = new SqlConnection(....);
> SqlCommand command = new SqlCommand('xp_blahblahblah", con);
> command.CommandType = CommandType.StoredProcedure;
> .....
> ...
> command.ExecuteScalar();
>
> However, it always throw exception saying "Could not find store procedure
> xp_blahblahblah"....
> Is there any way I can use the extended stored procedure programatically?
>
> Thanks.
>
> ..................................................................TJ


Re: Programatically call extended stored procedure? by William

William
Wed Jun 07 22:34:07 CDT 2006

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag01/html/ManagingExtendedProperties.asp
This shows you how--basically, put the ESP and parameters into the
CommandText preceded with EXEC


EXEC sp_addextendedproperty 'caption',
'Employee ID', 'user', dbo, 'table', T1, 'column', id
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________

"TJ" <TJ@discussions.microsoft.com> wrote in message
news:5804B8C5-63A5-43D9-9E38-A63A0E58C69C@microsoft.com...
> Hi,
>
> C# / .NET Framework 1.1
>
> I would like to query extended stored procedure like stored procedure...
> However, I found that CommandType property does not have Extended Stored
> Procedure value.....
>
> I tried something like..
>
> SqlConnection con = new SqlConnection(....);
> SqlCommand command = new SqlCommand('xp_blahblahblah", con);
> command.CommandType = CommandType.StoredProcedure;
> .....
> ...
> command.ExecuteScalar();
>
> However, it always throw exception saying "Could not find store procedure
> xp_blahblahblah"....
> Is there any way I can use the extended stored procedure programatically?
>
> Thanks.
>
> ..................................................................TJ