Whats wrong with this SqlParameter ?

J

Jim Andersen

I am using Microsoft.ApplicationBlocks.Data (v 2.0.0.0).
I have this parameter array I pass to a stored procedure. The last one is an
output parameter.

So I did this:
Line 1: arParms(8) = New SqlClient.SqlParameter("@MyParam", SqlDbType.Int,
4, ParameterDirection.Output)

Line 2: arParms(8).Direction = ParameterDirection.Output

When I debug, after line 1, I can see that it is now an Input Parameter.
When I debug after Line 2, it is an output parameter.

Whats wrong with line 1 ?

/jim
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top