Table of Contents

Class Field

Namespace
PolarDataInterop
Assembly
PolarDataInterop.dll

This class contains the details of one field in a recordset.

public class Field
Inheritance
Field
Inherited Members
Extension Methods

Fields

ColumnInfo

Returns the ColumnInfo of the underlying DbColumn.

public DbColumn ColumnInfo

Field Value

DbColumn

Updatable

Returns True if the field is updatable.

public bool Updatable

Field Value

bool

Properties

ActualSize

Returns the size of the actual data in the field.

public int ActualSize { get; }

Property Value

int

DataTypeName

Returns the name of the field-type in the database, like nvarchar, datetime or varbinary.

public string DataTypeName { get; }

Property Value

string

DefinedSize

Returns the size of the field for text fields.

public int DefinedSize { get; }

Property Value

int

Dirty

Returns True if the field has unsaved changes.

public bool Dirty { get; }

Property Value

bool

Index

Returns the 0-based position of the field.

public int Index { get; }

Property Value

int

IsAutoIncrement

Returns True if the field is an auto-increment field (autonumber).

public bool IsAutoIncrement { get; }

Property Value

bool

IsIdentity

Returns True if the field is an Identity

public bool IsIdentity { get; }

Property Value

bool

IsKey

Returns True if the field is part of the primary key.

public bool IsKey { get; }

Property Value

bool

IsReadOnly

Returs True if the field is read-only.

public bool IsReadOnly { get; }

Property Value

bool

Name

Returns the Name

public string Name { get; }

Property Value

string

Required

Returns True if the field is required (cannot contain a NULL value)

public bool Required { get; }

Property Value

bool

Type

Returns the type of field.

public EnumFieldType Type { get; }

Property Value

EnumFieldType

Value

Gets/sets the value of the field.

public object Value { get; set; }

Property Value

object

Methods

AppendChunck(object)

For appending generic typed values to a chunk. Value must be of type string, bytearray or NULL

public void AppendChunck(object pChunckData)

Parameters

pChunckData object

The data to append. Must be string, byte[] or DBNull

Exceptions

ArgumentException

Throws an exception if wrong field type or wrong type of data.

AppendChunk(byte[])

To append a chunk of data to a binary (Image) field.

public void AppendChunk(byte[] pChunkData)

Parameters

pChunkData byte[]

The bytes to append.

Exceptions

Exception

Throws an exception if not an image or varbinary field.

AppendChunk(string)

To append a chunk of data to a binary (Image) field.

public void AppendChunk(string pChunkData)

Parameters

pChunkData string

The bytes as binary string to append.

Exceptions

Exception

Throws an exception if not an image or varbinary field.

GetChunk(int)

Gets a chunk from a binary field and returns the data as bytearray.

public byte[] GetChunk(int pChunkSize)

Parameters

pChunkSize int

The number of bytes to get.

Returns

byte[]

The data as bytearray.

Exceptions

Exception

Throws an exception if wrong type of field.

GetChunk_String(int)

Gets a chunk from a binary field and returns the data as binary string.

public string GetChunk_String(int pChunkSize)

Parameters

pChunkSize int

The number of bytes to get.

Returns

string

The data as binary string.

Exceptions

Exception

Throws an exception if wrong type of field.

IsNotNull()

Returns True if the value of the field is not NULL

public bool IsNotNull()

Returns

bool

IsNull()

Returns True if the value of the field is NULL

public bool IsNull()

Returns

bool

ToJson()

Converts the value of this field to JSON.

public string ToJson()

Returns

string

The JSON for this field, like: "City" : "Amsterdam"