---
name: "dbfadd"
section: "1"
platform: "linux"
package: "shapelib"
version: "1.6.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/dbfadd"
---

# dbfadd(1)

add a row to an xBase DBF file ##SYNOPSIS dbfadd xbase\_file field\_values... ##DESCRIPTION Adds a row to the DBF file named by xbase\_file with column values given by the field\_values options that follow. A NULL value is denoted by an empty argument. ##OPTIONS ##EXAMPLE dbfadd testbase.dbf REGION1 25.656 150.22 Assuming that testbase.dbf has 3 fields (NAME, AREA and VALUE), this command line will insert a new record into testbase.dbf with the value "REGION1" for NAME, '25.656' for AREA and '150.22' for VALUE field. ##EXIT STATUS ##DIAGNOSTICS The following diagnostics may be issued on stdout: DBFOpen(xbase\_file,"rb+") failed. Got count1 fields, but require count2 ##AUTHOR dbfcreate is part of shapelib, maintained by Frank Warmerdam. This guide was created by Eduardo Patoo Kanegae and converted to manpage by Johan Van de Wauw. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja@cc.helsinki.fi). ##BUGS Field values that are too large to fit in a field are silently truncated from the right. Numeric field values that can't be parsed by atof(3) get undefined values. ##SEE ALSO dbfcat(1), dbfcreate(1), dbfdump(1), dbfinfo(1), shpadd(1), shpcat(1), shpcentrd(1), shpcreate(1), shpdump(1), shpdxf(1), shpfix(1), shpinfo(1), shpproj(1), shprewind(1), shptest(1)

## NAME

**dbfadd** - add a row to an xBase DBF file

\##SYNOPSIS **dbfadd** *xbase\_file* *field\_values...*

\##DESCRIPTION Adds a row to the DBF file named by *xbase\_file* with column values given by the *field\_values* options that follow. A NULL value is denoted by an empty argument.

\##OPTIONS

- *xbase\_file*

  the name of an existing xBase file

- *field\_values*

  list of values to be inserted into the xBase file. You must specify a number of values equal to the number of fields the xBase file has. The order of values must also reflect the order of fields inside xBase file.

\##EXAMPLE **dbfadd** *testbase.dbf* *REGION1* *25.656* *150.22*

Assuming that *testbase.dbf* has 3 fields (**NAME**, **AREA** and **VALUE**), this command line will insert a new record into *testbase.dbf* with the value "*REGION1*" for **NAME**, '*25.656*' for **AREA** and '*150.22*' for **VALUE** field.

\##EXIT STATUS

- **0**

  Successful program execution.

- **1**

  Missing *xbase\_file* or *field\_values* arguments.

- **2**

  Failed to open *xbase\_file* for reading and appending.

- **3**

  Too few values in *field\_values...*

\##DIAGNOSTICS The following diagnostics may be issued on stdout:

DBFOpen(*xbase\_file*,"rb+") failed.

Got *count1* fields, but require *count2*

\##AUTHOR **dbfcreate** is part of shapelib, maintained by Frank Warmerdam. This guide was created by Eduardo Patoo Kanegae and converted to manpage by Johan Van de Wauw. It was further enhanced with the man page written by Joonas Pihlaja (jpihlaja@cc.helsinki.fi).

\##BUGS Field values that are too large to fit in a field are silently truncated from the right. Numeric field values that can't be parsed by [**atof**(3)](/atof/3.md) get undefined values.

\##SEE ALSO [**dbfcat**(1)](/dbfcat/1.md), [**dbfcreate**(1)](/dbfcreate/1.md), [**dbfdump**(1)](/dbfdump/1.md), [**dbfinfo**(1)](/dbfinfo/1.md), [**shpadd**(1)](/shpadd/1.md), [**shpcat**(1)](/shpcat/1.md), [**shpcentrd**(1)](/shpcentrd/1.md), [**shpcreate**(1)](/shpcreate/1.md), [**shpdump**(1)](/shpdump/1.md), [**shpdxf**(1)](/shpdxf/1.md), [**shpfix**(1)](/shpfix/1.md), [**shpinfo**(1)](/shpinfo/1.md), [**shpproj**(1)](/shpproj/1.md), [**shprewind**(1)](/shprewind/1.md), [**shptest**(1)](/shptest/1.md)
