Hi,
Is this a bug?
SqlClient Parameters collection
Prior to the following snippet a set of parameters were declared and
added to the parameters collection.
The parameter values I originally assigned using the syntax in the
SECOND line of code.
The code failed on the first line when it was written in the second
line syntax.with
'this Parameter collection does not contain parameter 'pmyID''
So I altered toaddress the parameter directly and the line executes
ok.
given that intellisense allows you to construct the second line syntax
is there a bug here?
thanks
Bob
pmyId.Value = en.Current.ID.ToString(); //This line works
mycmd.Parameters["pmyId"].Value = en.Current.ID.ToString() //This
line fails