Home All Groups Group Topic Archive Search About

DotNet 2.0 SQLCommandBuilder.DeriveParameters can't find store procedure

Author
6 Dec 2006 5:35 PM
greg
I have a windows utility that generates .Net procedure call wrappers.
Have used for DotNet 1.0 and DotNet 1.1

This code fails at the DeriveParameters call, saying can't find
storeprocedure

cmd = New SqlCommand(SpName, DirectCast(Connect(), SqlConnection))

cmd.CommandTimeout = Me.CommandTimeout

Dim DiscoveredParameters() As SqlParameter

cmd.CommandType = CommandType.StoredProcedure

SqlCommandBuilder.DeriveParameters(cmd)



But this works perfectly against same database and proc with DotNet 1.1

Thanks

Author
7 Dec 2006 12:57 PM
Otis Mukinfus
Show quote
On Wed, 6 Dec 2006 11:35:15 -0600, "greg" <greg@no.spam.news> wrote:

>I have a windows utility that generates .Net procedure call wrappers.
>Have used for DotNet 1.0 and DotNet 1.1
>
>This code fails at the DeriveParameters call, saying can't find
>storeprocedure
>
>cmd = New SqlCommand(SpName, DirectCast(Connect(), SqlConnection))
>
>cmd.CommandTimeout = Me.CommandTimeout
>
>Dim DiscoveredParameters() As SqlParameter
>
>cmd.CommandType = CommandType.StoredProcedure
>
>SqlCommandBuilder.DeriveParameters(cmd)
>
>
>
>But this works perfectly against same database and proc with DotNet 1.1
>
>Thanks
>
>
>
>

I don't see in your code where you name the stored procedure, unless it is
SpName.  Am I missing something?  Did you check that SpName is correct?

Are you now trying to use the wrapper for .NT 2.0?
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

AddThis Social Bookmark Button