Data Access has been discontinued. Please refer to this page for more information.

MetaStoredProcedureParameter

The MetaStoredProcedureParameter element is a child of the MetaStoredProcedure that specifies parameters for a stored procedure in the database.

The MetaStoredProcedureParameter class exposes the following properties:

  • AdoType - the Ado data type for the current parameter. It is used for internal type mapping.
  • DeclaringProcedure - the MetaStoredProcedure object that represents the procedure to which the parameter belongs.
  • IsNullable - indicates whether the corresponding parameter can accept a null value.
  • Length - the length of the parameter.
  • Mode - the mode of the parameter - In, Out or InOut.
  • Scale - the scale of the parameter.
  • SqlType - the server type of the parameter.

The following examples shows you how to get information about the stored procedures in your model:

private string GetStoredProcedures(Telerik.OpenAccess.Metadata.MetadataContainer container)
{
   StringBuilder sb = new StringBuilder();
   foreach (MetaStoredProcedure storedProcedure in container.StoredProcedures)
   {
       sb.AppendFormat("\nName: {0}", storedProcedure.Name);
       sb.AppendLine("Parameters:");
       foreach (MetaStoredProcedureParameter parameter in storedProcedure.Parameters)
       {
           sb.AppendFormat("\tParameterName: {0}", parameter.Name);
           sb.AppendFormat("\tType: {0}", parameter.Type);
       }
   }
   return sb.ToString();
}
Private Function GetStoredProcedures(ByVal container As Telerik.OpenAccess.Metadata.MetadataContainer) As String
 Dim sb As New StringBuilder()
 For Each storedProcedure As MetaStoredProcedure In container.StoredProcedures
  sb.AppendFormat(vbLf & "Name: {0}", storedProcedure.Name)
  sb.AppendLine("Parameters:")
  For Each parameter As MetaStoredProcedureParameter In storedProcedure.Parameters
   sb.AppendFormat(vbTab & "ParameterName: {0}", parameter.Name)
   sb.AppendFormat(vbTab & "Type: {0}", parameter.Type)
  Next parameter
 Next storedProcedure
 Return sb.ToString()
End Function