SqlCommandBuilder DeriveParameters Ouput Arg gets wrong direction

  • Thread starter Thread starter JM
  • Start date Start date
J

JM

First, I am using the Enterprise Library DatabaseFactory to get a Database
object. I have traced the issue down to the SqlCommandBuilder
DeriveParameters method.

Given a stored procedure args:

CREATE PROCEDURE UpdDept
( @KeyDepartmentIdentifier UNIQUEIDENTIFIER,
@KEYTimestamp BINARY(8),
@NewName NVARCHAR(50),
:
:
@OutTimeStamp BINARY(8)
)

Wheh I call the Database.DiscoverParameters (aka -
SqlCommandBuilder.DeriveParameters) the @OutTimeStamp DbPArameter
(SqlParameter) has its direction set to InputOutput.

SQL procedure parameters are either input or output. InputOut is not
defined (SQL 2005).

Why is the direction set to InputOutput?

This requires that I initialize the output parameter.

JM
 
Sorry the parameters should have read:

CREATE PROCEDURE UpdDept
( @KeyDepartmentIdentifier UNIQUEIDENTIFIER,
@KEYTimestamp BINARY(8),
@NewName NVARCHAR(50),
:
:
@OutTimeStamp BINARY(8) OUTOUT
 

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

Back
Top