rp
asked on
asp,net vb.net update command parameters
When i use an sql command to update a table with parameters like:
"update product set name=@name ....
Watt is the difference between:
cmd.Parameters.Add("@name" , SqlDbType.VarChar, 60)
cmd.Parameters("@name").Va lue = TxtMatricula.Text
and:
cmd.Parameters.AddWithValu e("@neme", Trim(Txtname.Text))
"update product set name=@name ....
Watt is the difference between:
cmd.Parameters.Add("@name"
cmd.Parameters("@name").Va
and:
cmd.Parameters.AddWithValu
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, NazoUK seems to present my example in a theoritical way as well...
Not really, he wanted to know how using AddWithValue was different. You didn't address this point at all.
Yes, i overlooked last statement of the question, however i answered first 2 perfect.
However cmd.Parameters("@name").Va
Unless you create a variable (parameter) how can you add value to add... it's that simple...