Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
SqlParameter Class
 Offset Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
SqlParameter..::.Offset Property

Gets or sets the offset to the Value property.

Namespace:  System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)
Visual Basic (Declaration)
<BrowsableAttribute(False)> _
Public Property Offset As Integer
Visual Basic (Usage)
Dim instance As SqlParameter
Dim value As Integer

value = instance.Offset

instance.Offset = value
C#
[BrowsableAttribute(false)]
public int Offset { get; set; }
Visual C++
[BrowsableAttribute(false)]
public:
property int Offset {
    int get ();
    void set (int value);
}
JScript
public function get Offset () : int
public function set Offset (value : int)

Property Value

Type: System..::.Int32
The offset to the Value. The default is 0.

The Offset property is used for client-side chunking of binary and string data. For example, in order to insert 10MB of text into a column on a server, a user might execute 10 parameterized inserts of 1MB chunks, shifting the value of Offset on each iteration by 1MB.

Offset specifies the number of bytes for binary types, and the number of characters for strings. The count for strings does not include the terminating character.

The following example creates a SqlParameter and sets some of its properties.

Visual Basic
Private Sub CreateSqlParameterOffset()
    Dim parameter As New SqlParameter("pDName", SqlDbType.VarChar)
    parameter.IsNullable = True
    parameter.Offset = 3
End Sub
C#
static void CreateSqlParameterOffset()
{
    SqlParameter parameter = new SqlParameter("pDName", SqlDbType.VarChar);
    parameter.IsNullable = true;
    parameter.Offset = 3;
}

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 3.5, 2.0, 1.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker