Partager via


AdoDotNetParameter.GetTypeFrom Method

Maps the value type to a DbType value and returns the string equivalent.

Namespace:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
Protected Overrides Function GetTypeFrom ( _
    value As Object _
) As String
protected override string GetTypeFrom(
    Object value
)
protected:
virtual String^ GetTypeFrom(
    Object^ value
) override
abstract GetTypeFrom : 
        value:Object -> string  
override GetTypeFrom : 
        value:Object -> string
protected override function GetTypeFrom(
    value : Object
) : String

Parameters

Return Value

Type: System.String
The corresponding DbType string value, or AnsiString for a null or DBNull value.

Remarks

This method is called by the base implementation of the OnValueChanging and OnValueChanged methods. It calls the OnValueChanging method to determine whether the value is of a valid type. It calls the OnValueChanged method to set the type appropriately, based on the new value (unless the type was explicitly set otherwise).

The base implementation of this method calls GetTypeFrom on the object value and returns the .NET Framework type name.

.NET Framework Security

See Also

Reference

AdoDotNetParameter Class

Microsoft.VisualStudio.Data.Framework.AdoDotNet Namespace