DotNet 2.0 SQLCommandBuilder.DeriveParameters can't find store procedure

  • Thread starter Thread starter greg
  • Start date Start date
G

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
 
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
 
Back
Top