asp.net.ph

OleDbParameterCollection.Count Property

System.Data.OleDb Namespace   OleDbParameterCollection Class


Returns the number of parameters in the collection.

Syntax


Script [ integer variable = ] OleDbParameterCollection.Count

Property Value


variable The number of OleDbParameter objects in the collection.

Implements

ICollection.Count

Example

The following example shows use of the Count property to set the upper bound of a loop that displays 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 [ ].ToString ( ) + "\n";
   }
   MessageBox.Show ( myParamNames );
}
  C# VB

See Also

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