System.Data.OleDb Namespace OleDbParameterCollection Class
Adds a specified OleDbParameter object to the parameters collection.
[ VB ] Overloads Public Sub Add ( _ ByVal param As OleDbParameter _ ) As OleDbParameter [ C# ] public OleDbParameter Add ( OleDbParameter param ); [ C++ ] public: OleDbParameter Add ( OleDbParameter* param ); [ JScript ] public function Add ( param : OleDbParameter ) : OleDbParameter;
The newly created OleDbParameter.
The following example adds a new OleDbParameter using this constructor.
public void CreateOleDbParamColl ( OleDbConnection myConn ) { OleDbCommand myCommand = new OleDbCommand ( "SELECT * FROM Customers WHERE CustomerID = ?", myConn ); OleDbParameterCollection myParams = myCommand.Parameters; OleDbParameter myParam = myParams.Add ( new OleDbParameter ( "CustomerID", OleDbType.VarChar ) ); }
Public Sub CreateOleDbParamColl ( myConn As OleDbConnection ) Dim myCommand As New OleDbCommand ( _ "SELECT * FROM Customers WHERE CustomerID = ?", myConn ) Dim myParams As OleDbParameterCollection = myCommand.Parameters Dim myParam As OleDbParameter = myParams.Add ( New OleDbParameter ( _ "CustomerID", OleDbType.VarChar ) ) End Sub
OleDbParameterCollection Members OleDbParameterCollection.Add Overload List OleDbParameter
© 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