URL: http://www.firstbasesoftware.com/man/man3/store.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

store - store a string into a database field

SYNOPSIS

#include <firstbase/fb.h>

fb_store(k, s, db)
fb_field *k;
char *s;
fb_database *db;

DESCRIPTION

As explained in the database(4) manual page, a database structure contains all of the elements needed for an entire database, including an array of field structures, all file names and descriptors, and index information. Altogether, the array of field structures can hold one complete record.

Store provides a mechanism for creating or modifying fields within the array of field descriptors stored in the database structure. Once modified, putrec(3) is used to write the entire record to the database file.

Fb_store places the string s into field k of the database pointed to by db. No length checking is done to make sure s does not exceed the maximum width of the field as defined in the database dictionary.

Fb_store uses the alternate storage area, db->arec, to store the field. The field descriptor is updated to point to this new area.

Note that in the case of FB_BINARY fields, the entire field is ALWAYS fixed length. Furthermore, it is up to the programmer using fb_store to make sure the object being stored is the same byte size as the field length in the database dictionary.

CLIENT/SERVER

The fb_store routine will transparently call the fb_store_clnt mechanism when the global FirstBase variable cdb_use_rpc is set to one. See fb_clnt_create(3) for more details.

SEE ALSO

putrec(3), opendb(3).


URL: http://www.firstbasesoftware.com/man/man3/store.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]