SqlCeParameter.DbType Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets or sets the DbType of the parameter.

  [Visual Basic]
  Public Overridable Property DbType As DbType  Implements _
   IDataParameter.DbType
[C#]
public virtual DbType DbType {get; set;}
[C++]
public: __property virtual DbType get_DbType();
public: __property virtual void set_DbType(DbType);
[JScript]
public function get DbType() : DbType;
public function set DbType(DbType);

Property Value

One of the DbType values. The default is String.

Implements

IDataParameter.DbType

Exceptions

Exception Type Condition
ArgumentOutOfRangeException The property was not set to a valid DbType.

Remarks

SqlDbType and DbType are linked. Therefore, setting the DbType changes the SqlDbType to a supporting SqlDbType.

The SQL Server CE .NET Provider supports the following DBTypes: DbType.Byte, DbType.Int16, DbType.Int32, DbType.Int64, DbType.SByte, DbType.UInt16, DbType.UInt32, DbType.UInt64, DbType.Binary, DbType.Boolean, DbType.Currency, DbType.DateTime, DbType.Decimal, DbType.Double, DbType.Guid, DbType.Single, DbType.String, DbType.StringFixedLength

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

SqlCeParameter Class | SqlCeParameter Members | System.Data.SqlServerCe Namespace | SqlCeType

Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.

Send comments on this topic.

© Microsoft Corporation. All rights reserved.