Api.JetRetrieveColumn method (JET_SESID, JET_TABLEID, JET_COLUMNID, Byte , Int32, Int32, Int32, RetrieveColumnGrbit, JET_RETINFO)
Retrieves a single column value from the current record. The record is that record associated with the index entry at the current position of the cursor. Alternatively, this function can retrieve a column from a record being created in the cursor copy buffer. This function can also retrieve column data from an index entry that references the current record. In addition to retrieving the actual column value, JetRetrieveColumn can also be used to retrieve the size of a column, before retrieving the column data itself so that application buffers can be sized appropriately.
Namespace: Microsoft.Isam.Esent.Interop
Assembly: Microsoft.Isam.Esent.Interop (in Microsoft.Isam.Esent.Interop.dll)
Syntax
'Declaration
Public Shared Function JetRetrieveColumn ( _
sesid As JET_SESID, _
tableid As JET_TABLEID, _
columnid As JET_COLUMNID, _
data As Byte(), _
dataSize As Integer, _
dataOffset As Integer, _
<OutAttribute> ByRef actualDataSize As Integer, _
grbit As RetrieveColumnGrbit, _
retinfo As JET_RETINFO _
) As JET_wrn
'Usage
Dim sesid As JET_SESID
Dim tableid As JET_TABLEID
Dim columnid As JET_COLUMNID
Dim data As Byte()
Dim dataSize As Integer
Dim dataOffset As Integer
Dim actualDataSize As Integer
Dim grbit As RetrieveColumnGrbit
Dim retinfo As JET_RETINFO
Dim returnValue As JET_wrn
returnValue = Api.JetRetrieveColumn(sesid, _
tableid, columnid, data, dataSize, _
dataOffset, actualDataSize, grbit, _
retinfo)
public static JET_wrn JetRetrieveColumn(
JET_SESID sesid,
JET_TABLEID tableid,
JET_COLUMNID columnid,
byte[] data,
int dataSize,
int dataOffset,
out int actualDataSize,
RetrieveColumnGrbit grbit,
JET_RETINFO retinfo
)
Parameters
sesid
Type: Microsoft.Isam.Esent.Interop.JET_SESIDThe session to use.
tableid
Type: Microsoft.Isam.Esent.Interop.JET_TABLEIDThe cursor to retrieve the column from.
columnid
Type: Microsoft.Isam.Esent.Interop.JET_COLUMNIDThe columnid to retrieve.
data
Type: []The data buffer to be retrieved into.
dataSize
Type: System.Int32The size of the data buffer.
dataOffset
Type: System.Int32Offset into the data buffer to read data into.
actualDataSize
Type: System.Int32Returns the actual size of the data buffer.
grbit
Type: Microsoft.Isam.Esent.Interop.RetrieveColumnGrbitRetrieve column options.
retinfo
Type: Microsoft.Isam.Esent.Interop.JET_RETINFOIf pretinfo is give as NULL then the function behaves as though an itagSequence of 1 and an ibLongValue of 0 (zero) were given. This causes column retrieval to retrieve the first value of a multi-valued column, and to retrieve long data at offset 0 (zero).
Return value
Type: Microsoft.Isam.Esent.Interop.JET_wrn
An ESENT warning code.
Remarks
This is an internal method that takes a buffer offset as well as size.