System.Data.OleDb Namespace OleDbParameterCollection Class
Adds an OleDbParameter with the specified name and value to the parameters collection.
[ VB ] Overloads Public Function Add ( _ ByVal parameterName As String, _ ByVal value As Object _ ) As OleDbParameter [ C# ] public OleDbParameter Add ( string parameterName, Object value ); [ C++ ] public: OleDbParameter* Add ( String* parameterName, Object* value ); [ JScript ] public function Add ( parameterName : String, value : Object ) : OleDbParameter;
The newly created OleDbParameter.
When you specify an Object in the value parameter, the OleDbType is inferred from the .NET Framework type of the Object.
The following example adds a new OleDbParameter using this constructor.
OleDbCommand cmd = new OleDbCommand ( null, conn ); cmd.CommandText = "Insert into Categories ( CategoryName ) values ( ? ) "; cmd.Parameters.Add ( "@CategoryName", "Beverages" );
Dim cmd As New OleDbCommand ( null, conn ) cmd.CommandText = "Insert into Categories ( CategoryName ) values ( ? ) " cmd.Parameters.Add ( "@CategoryName", "Beverages" )
OleDbParameterCollection Members OleDbParameterCollection.Add Overload List Value
© 2000-2010 Rey Nuñez All rights reserved.If you have any question, comment or suggestion about this site, please send us a note
You can help support asp.net.ph