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




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