asp.net.ph

OleDbParameterCollection.Item Property ( Int32 )

System.Data.OleDb Namespace   OleDbParameterCollection Class


Returns the OleDbParameter at the specified index.

Syntax


OleDbParameter variable = OleDbParameterCollection.Item [ index ];
... or ...
OleDbParameter variable = OleDbParameterCollection [ index ];
  C# VB JScript

Parameters

index
The zero-based index of the parameter to retrieve.

Property Value

The OleDbParameter at the specified index.

Exceptions


Exception Type Condition
IndexOutOfRangeException Occurs when the specified index does not exist.

Example

The following example shows use of the Item property to display the name of each OleDbParameter object in a given OleDbParameterCollection.

public void CreateOleDbParamColl ( OleDbCommand myCmd ) {
   OleDbParameterCollection myParams = myCmd.Parameters;
   string myParamNames = "";

   for ( int i=0; i < myParams.Count; i++ ) {
      myParamNames += myParams [ i ].ToString ( ) + "\n";
   }
   MessageBox.Show ( myParamNames );
}
  C# VB

See Also

OleDbParameterCollection Members   OleDbParameterCollection.Item Overload List Skip Navigation Links




Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note