asp.net.ph

OleDbParameterCollection.Add Method

System.Data.OleDb Namespace   OleDbParameterCollection Class


Adds an OleDbParameter to the parameters collection.

Overload List

1. Adds a new OleDbParameter object to the parameters collection.

2. Adds a specified OleDbParameter object to the parameters collection.

3. Adds an OleDbParameter with the specified name and value to the parameters collection.

4. Adds an OleDbParameter with the specified name and data type to the parameters collection.

5. Adds an OleDbParameter with the specified name, data type, and column width to the parameters collection.

6. Adds an OleDbParameter with the specified name, data type, column width, and source column name to the parameters collection.


Example

The following example adds a new OleDbParameter.

NOTE: This example shows how to use one of the overloaded versions of Add. For other examples that may be available, see the individual overload topics.

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, 5, "CustomerID" ) );
}
  C# VB

See Also

OleDbParameterCollection Members 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