DotNet 2.0 SQLCommandBuilder.DeriveParameters can't find store procedure

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
 
O

Otis Mukinfus

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top