Version

TryParse Method

Attempts to parse the specified SQL Server Database Engine type and returns the corresponding System.Data.SqlDbType constant if the parse operation is successful.
Syntax
'Declaration
 
Public Shared Function TryParse( _
   ByVal sqlServerType As String, _
   ByRef sqlDbType As SqlDbType _
) As Boolean
public static bool TryParse( 
   string sqlServerType,
   out SqlDbType sqlDbType
)

Parameters

sqlServerType
A string specifying the SQL Server Database Engine type.
sqlDbType
[out] If the parse operation was successful, contains the corresponding System.Data.SqlDbType constant. If the parse operation fails, this value is undefined.

Return Value

A boolean value indicating whether the value was successfully parsed.
Remarks

See the following MSDN topic for further information: "SQL Server Data Type Mappings (ADO.NET)".

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also