skip book previous and next navigation links
go up to top of book: HP Open Source Security for OpenVMS Volume 1:... HP Open Source Security for OpenVMS Volume 1:...
go to beginning of reference: API FunctionsAPI Functions
go to previous page: DL_DataGetNextDL_DataGetNext
go to next page: DL_DataModifyDL_DataModify
end of book navigation links


DL_DataInsert
Library
Description
Errors
 Parameters
Return Value
See Also

NAME

DL_DataInsert: CSSM_DL_DataInsert - Create new persistent data record (CDSA)

SYNOPSIS  

# include <cssm.h>

API:CSSM_RETURN CSSMAPI CSSM_DL_DataInsert(CSSM_DL_DB_HANDLE DLDBHandle,CSSM_DB_RECORDTYPE RecordType,const CSSM_DB_RECORD_ATTRIBUTE_DATA *Attributes,const CSSM_DATA *Data,CSSM_DB_UNIQUE_RECORD_PTR *UniqueId)SPI:CSSM_RETURN CSSMDLI DL_DataInsert(CSSM_DL_DB_HANDLE DLDBHandle,CSSM_DB_RECORDTYPE RecordType,const CSSM_DB_RECORD_ATTRIBUTE_DATA *Attributes,const CSSM_DATA *Data,CSSM_DB_UNIQUE_RECORD_PTR *UniqueId)


return to top LIBRARY  

Common Security Services Manager library (cdsa$incssm300_shr.exe)


return to top PARAMETERS  

DLDBHandle (input)
 The handle pair that describes the add-in data storagelibrary module to be used to perform this function and the opendata store in which to insert the new data record.
RecordType (input)
 Indicates the type of data record being added tothe data store.
Attributes (input/optional)
 A list of structures containing the attribute valuesto be stored in that attribute, and the meta information (schema)describing those attributes. The list contains at most one entry perattribute in the specified record type. The specified AttributeFormat foreach attribute must match that of the database schema, otherwisethe error CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT is returned. If anattribute is of type CSSM_DB_ATTRIBUTE_FORMAT_STRING and the valuespecified for that string includes a null-terminator, then the lengthcount in the CSSM_DATA structure containing the input string shouldinclude the terminating character. (If null-terminators are used, theyshould be used consistently when storing, searching, and retrievingthe string value, otherwise selection predicates will not locateexpected matches.) For those attributes that are not assigned valuesby the caller, the DL module may assume the values to be the empty set,or assume default values, or return an error. If the specified recordtype does not contain any attributes, this parameter must be NULL.
Data (input/optional)
 A pointer to the CSSM_DATA structure which containsthe opaque data object to be stored in the new data record. If thespecified record type does not contain an opaque data object, thisparameter must be NULL.
UniqueId (output)
 A pointer to a CSSM_DB_UNIQUE_RECORD_PTR containinga unique identifier associated with the new record. This uniqueidentifier structure can be used in future references to this recordduring the current open data base session. The pointer will be set toNULL if the function fails. The CSSM_DL_FreeUniqueRecord() function must be used to deallocate this structure.


return to top DESCRIPTION  

This function creates a new persistent data record of thespecified type by inserting it into the specified data store. Thevalues contained in the new data record are specified by the Attributes andthe Data. The attribute value list contains zeroor more attribute values. The Attributes parameteralso specifies a record type. This type must be the same as thetype specified by the RecordType input parameter.The DL module may require initial values for the CSSM pre-definedattributes. The DL module can assume default values for any unspecifiedattribute values or can return an error condition when DLM-requiredattribute values are not specified by the caller. The Data is anopaque object to be stored in the new data record.

If a primary key (concatination of all unique indexes in therelation) exists, the error CSSMERR_DL_INVALID_UNIQUE_INDEX_DATAis returned. The client should call CSSM_DL_DataGetFirst(), followed by CSSM_DL_DataModify() to change an existing record.


return to top RETURN VALUE  

A CSSM_RETURN value indicating success or specifying a particularerror condition. The value CSSM_OK indicates success. All othervalues represent an error condition.


return to top ERRORS  

Errors are described in the CDSA Technical Standard.
CSSMERR_DL_FIELD_SPECIFIED_MULTIPLECSSMERR_DL_INCOMPATIBLE_FIELD_FORMATCSSMERR_DL_INVALID_FIELD_NAMECSSMERR_DL_INVALID_DB_HANDLECSSMERR_DL_INVALID_PARSING_MODULECSSMERR_DL_INVALID_RECORDTYPECSSMERR_DL_INVALID_RECORD_UIDCSSMERR_DL_INVALID_UNIQUE_INDEX_DATACSSMERR_DL_INVALID_VALUECSSMERR_DL_MISSING_VALUE


return to top SEE ALSO  

Books

Intel CDSA Application Developer's Guide

Online Help

Functions for the CSSM API:

CSSM_DL_DataDelete

Functions for the DL SPI:

DL_DataDelete


go to previous page: DL_DataGetNextDL_DataGetNext
go to next page: DL_DataModifyDL_DataModify