asp.net.ph

OleDbParameterCollection.Add Method ( OleDbParameter )

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;

Parameters

param
The OleDbParameter to add.

Return Value

The newly created OleDbParameter.

Example

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 ) );
}
  C# VB

See Also

OleDbParameterCollection Members   OleDbParameterCollection.Add Overload List   OleDbParameter Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 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