AJ - What isn't clear specifically - perhaps with more information I could
be more helpful.. The first line creates a Simple string that will be used
as the CommandText property of the command object. The next line creates a
command object using the commandtext referenced above, and a connection
object.
The next line adds a Parameter to the command's parameters colllection -
first specifying the paramaeter name, then the type, then the size). The
following line sets the value of that parameter.
The example Cor uses is better than mine in that he uses the index - which
will always correspond to the position in which the parameter was added. If
you look at the parameter object though - there are multiple overloads for
it and fortunately you get intellisense with it, but if you can tell us
exactly which item is giving you the confusion, we can probably be of more
help.
Cheers,
Bill
--
W.G. Ryan MVP (Windows Embedded)
TiBA Solutions
www.tibasolutions.com |
www.devbuzz.com |
www.knowdotnet.com
A.J said:
cmd.Parameters.Add("@FirstName", SqlDbType.VarChar, 20);
cmd.Parameters("@FirstName").Value = "William";
these statements are not clear could you please provide me with some
articles related to them.