Home All Groups Group Topic Archive Search About

Call extended stored procedure programatically?

Author
7 Jun 2006 9:51 PM
TJ
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

Author
7 Jun 2006 10:36 PM
sloan
I believe stored xp procedure belong to

master.dbo.xp_abc



Show quote
"TJ" <T*@discussions.microsoft.com> wrote in message
news:093AC5C3-690F-4EC7-85E4-61C3E2426D1B@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
>

AddThis Social Bookmark Button