[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 1

dbm_store Subroutine

Purpose

Places data under a key.

Library

C Library (libc.a)

Syntax

#include <ndbm.h>
int dbm_store (db, key, content, flags)
DBM *db;
datum key, content;
int flags;

Description

The dbm_store subroutine places data under a key.

Parameters

db Specifies the database to store.
key Specifies the input key.
content Specifies the value associated with the key to store.
flags Contains either the DBM_INSERT or DBM_REPLACE flag.

Return Values

Upon successful completion, this subroutine returns a value of 0. If unsuccessful, the subroutine returns a negative value. When the dbm_store subroutine is called with the flags parameter set to the DBM_INSERT flag and an existing entry is found, it returns a value of 1. If the flags parameter is set to the DBM_REPLACE flag, the entry will be replaced, even if it already exists.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The store subroutine.

List of NDBM and DBM Programming References and NDBM Overview in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]