ورود

View Full Version : فرق دستور add با AddWithValue



saleh.hi.62
سه شنبه 26 آذر 1387, 00:19 صبح
فرق دستور add با .addvithvalue cmd.paramter.چی؟

Chabok
سه شنبه 26 آذر 1387, 12:18 عصر
Add

SqlParameterCollection.Add (Object) Adds the specified SqlParameter object to the SqlParameterCollection.

SqlParameterCollection.Add (SqlParameter) Adds the specified SqlParameter object to the SqlParameterCollection.

SqlParameterCollection.Add (String, Object) Adds the specified SqlParameter object to the SqlParameterCollection.

SqlParameterCollection.Add (String, SqlDbType) Adds a SqlParameter to the SqlParameterCollection given the parameter name and the data type.

SqlParameterCollection.Add (String, SqlDbType, Int32) Adds a SqlParameter to the SqlParameterCollection, given the specified parameter name and value.

SqlParameterCollection.Add (String, SqlDbType, Int32, String) Adds a SqlParameter to the SqlParameterCollection with the parameter name, the data type, and the column length.

AddWithValue

public SqlParameter AddWithValue (
string parameterName,
Object value
)