• Antelope Release 5.10 Linux CentOS release 7.6.1810 (Core) 3.10.0 2020-05-12

 

NAME

dbget, dbput - get, put fields, records or tables from/to a database base table

SYNOPSIS

#include "db.h"

int dbget(Dbptr db, char *s)

int dbput(Dbptr db, char *s)

DESCRIPTION

dbget and dbput may be used to get and put records, fields, or even the entire table from a database base table. The requested information is read into (dbget) or from (dbput) the string s. s may be zero, in which case the scratch record is used. The information is just a character string -- no conversion is done. When dbget copies to a character string (not the scratch record), the strings is null terminated. When dbput copies from a character string, the string is silently truncated or padded with blanks to the right size.

OPTIONS

The database pointer may refer to the scratch record, and for dbget, may also refer to the null record. Also, if s is zero, the source or destination is the scratch record.

RETURN VALUES

dbget and dbput return 0 for success, dbINVALID in the event of failure. Error messages are left on the error register in the latter case.

LIBRARY

$(DBLIBS)

SEE ALSO

dbintro(3), dbadd(3), dbdelete(3), dbget(3), dbput(3), dbquery(3), dblookup(3), dbopen(3), dbinvalid(3)

BUGS AND CAVEATS

dbget and dbput also work on views, but typically return raw, binary database pointers rather than ascii records or fields. Use dbgetv and dbputv for views.

dbputv updates the Timedate field of a record (if the field exists), but dbput does not update this field.

AUTHOR

Daniel Quinlan
Printer icon