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
Updatable
Returns True if the field is updatable.
public bool Updatable
Field Value
Properties
ActualSize
Returns the size of the actual data in the field.
public int ActualSize { get; }
Property Value
DataTypeName
Returns the name of the field-type in the database, like nvarchar, datetime or varbinary.
public string DataTypeName { get; }
Property Value
DefinedSize
Returns the size of the field for text fields.
public int DefinedSize { get; }
Property Value
Dirty
Returns True if the field has unsaved changes.
public bool Dirty { get; }
Property Value
Index
Returns the 0-based position of the field.
public int Index { get; }
Property Value
IsAutoIncrement
Returns True if the field is an auto-increment field (autonumber).
public bool IsAutoIncrement { get; }
Property Value
IsIdentity
Returns True if the field is an Identity
public bool IsIdentity { get; }
Property Value
IsKey
Returns True if the field is part of the primary key.
public bool IsKey { get; }
Property Value
IsReadOnly
Returs True if the field is read-only.
public bool IsReadOnly { get; }
Property Value
Name
Returns the Name
public string Name { get; }
Property Value
Required
Returns True if the field is required (cannot contain a NULL value)
public bool Required { get; }
Property Value
Type
Returns the type of field.
public EnumFieldType Type { get; }
Property Value
Value
Gets/sets the value of the field.
public object Value { get; set; }
Property Value
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
objectThe 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
stringThe 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
intThe 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
intThe 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
IsNull()
Returns True if the value of the field is NULL
public bool IsNull()
Returns
ToJson()
Converts the value of this field to JSON.
public string ToJson()
Returns
- string
The JSON for this field, like: "City" : "Amsterdam"