DataStoreDataError DataStoreDiscardRecord(
word dsToken); /* session token to opened datastore */
Flushes the current record from the record buffer (without saving any changes). Returns a
DataStoreDataError
value (DSDE_NO_ERROR if successful).
Include: datastor.h
See Also: DataStoreSaveRecord().
DataStoreError DataStoreFieldEnum(
word dsToken,
RecordHeader *recordPtr,
void *enumDataPtr,
Boolean _pascal (*CallbackRoutine) (
void *fieldDataPtr,
word fieldDataSize,
FieldType fieldType,
FieldCategory fieldCat,
FieldID fieldID,
FieldFlags flags,
void *enumDataPtr));
Enumerates through the fields in the passed record. When the callback returns TRUE, stops enumeration and returns DSE_NO_ERROR. Takes the following arguments:recordPtr
RecordHeader
structure. typedef struct {
RecordID RH_id;
word RH_size;
byte RH_fieldCount;
} RecordHeader;
Be Sure To: Lock the record first with
DataStoreLockRecord() before calling this routine.
Warnings: Callback can modify data passed in enumDataPtr but cannot modify any actual field data.
Include: datastor.h
See Also: DataStoreRecordEnum().
DataStoreStructureError DataStoreFieldIDToName(
word dsToken, /* session token to opened datastore */
FieldID fieldID,
TCHAR *fieldNamePtr,
word *nameSizePtr);
Writes the field name corresponding to the passed
FieldID
(
fieldID
) to
fieldNamePtr
. Copies no more than nameSizePtr bytes and overwrites this same parameter with the number of bytes actually copied. Returns a
DataStoreStructureError
value (DSSE_NO_ERROR if successful).
Include: datastor.h
See Also: DataStoreFieldNameToID().
DataStoreStructureError DataStoreFieldNameToID(
word dsToken, /* session token to opened datastore */
TCHAR *fieldNamePtr,
FieldID *fieldIDPtr);
Writes the
FieldID
corresponding to the passed field name
(fieldNamePtr
) to
fieldIDPtr
. Returns a
DataStoreStructureError
value (DSSE_NO_ERROR if successful).
Include: datastor.h
See Also: DataStoreFieldIDToName().
DataStoreError DataStoreGetExtraData(
word dsToken, /* session token to opened datastore */
void *dataPtr, /* data read from file header */
word *dataSizePtr);
Writes any extra data for this datastore to
dataPtr
. Writes the number of bytes copied to
dataSizePtr
. Returns a
DataStoreError
value (DSE_NO_ERROR if successful).
Include: datastor.h
DataStoreDataError DataStoreGetField(
word dsToken, /* session token to opened datastore */
TCHAR *fieldNamePtr,
FieldID fieldID,
void **blockPtrPtr,
word *blockSizePtr,
MemHandle *blockHanPtr);
Writes contents of the passed field to a block. If
blockPtrPtr
is NULL, allocates a block and writes its handle to
blockHanPtr
and its size to
blockSizePtr
. If
blockPtrPtr
is not NULL and field data exceeds block size, copies
blockSizePtr
bytes to the block and returns DSDE_EXCEEDS_BUFFER_SIZE. Returns a
DataStoreDataError
value (DSDE_NO_ERROR if successful).
If referencing field by name, pass "0" in
fieldID
; if referencing field by
FieldID
, pass NULL in
fieldNamePtr
.
Warnings: If the passed field is not present, writes "0" to blockSizePtr and returns DSDE_NO_ERROR.
Include: datastor.h
See Also: DataStoreGetFieldChunk().
GEOS SDK TechDocs|
|
DataStoreCreate() ... |
DataStoreGetFieldChunk() ...