Compartir a través de


SqlCeParameter.Size Property

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

Gets or sets the maximum length of the data within the column.

  [Visual Basic]
  Public Overridable Property Size As Integer  Implements _
   IDbDataParameter.Size
[C#]
public virtual int Size {get; set;}
[C++]
public: __property virtual int get_Size();
public: __property virtual void set_Size(int);
[JScript]
public function get Size() : int;
public function set Size(int);

Property Value

The maximum length of the data within the column. The default value is inferred from the the parameter value.

Implements

IDbDataParameter.Size

Remarks

The Size property is used for binary and string types.

For variable-length data types, the Size property describes the maximum amount of data to send to the server. For example, the Size property can be used to limit the amount of data sent to the server for a string value to the first 100 bytes.

For Unicode string data, the Size property refers to the number of characters. The count for strings does not include the terminating character.

If not explicitly set, the size is inferred from the actual size of the specified parameter value.For fixed-width data types, the value of Size is ignored. It can be retrieved for informational purposes, and returns the maximum amount of bytes the provider uses when sending the value of the parameter to the server.

Requirements

Platforms: .NET Compact Framework

.NET Framework Security:

See Also

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

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

Send comments on this topic.

© Microsoft Corporation. All rights reserved.