dBASE.NET 1.0.0

dBASE.NET is a .NET class library used to load dBASE IV .dbf files. The Dbf class reads fields (DbfField) and records (DbfRecord) from a .dbf file. These fields and records can then be accessed as lists and looped over.

Install-Package dBASE.NET -Version 1.0.0
dotnet add package dBASE.NET --version 1.0.0
<PackageReference Include="dBASE.NET" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add dBASE.NET --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

dBASE.NET - Read and write DBF files with .NET

dBASE.NET is a .NET class library used to read FoxBase, dBASE III and dBASE IV .dbf files. Data read
from a file is returned as a list of typed fields and a list of records. This library is useful to add
data import from dBASE sources to a .NET project.

This code has been tested against a number of dBASE files found in the wild, including FoxBase and dBASE III/IV
files with and without memo files. A .NET unit test project is part of this repository and new test files
may be added to it over time.

Installing dBASE.NET

...

Introduction

Opening a DBF file

using dBASE.NET;

dbf.Read("database.dbf");

This returns an instance of the Dbf class. With this, you can iterate over fields found in the table:

foreach(DbfField field in dbf.Fields) {
	Console.WriteLine(field.Name);
}

You can also iterate over records:

foreach(DbfRecord record in dbf.Records) {
	for(int i = 0;  i < dbf.Fields.Count; i++) {
		Console.WriteLine(record[i]);
	}
}

Count the records:

Console.WriteLine(dbf.Records.Count);

Class diagram

Class diagram

yuml:

http://yuml.me/diagram/scruffy/class/edit/[Dbf]+->[DbfRecord], [Dbf]+->[DbfField], [DbfRecord]+->[DbfField], [Dbf]->[DbfHeader], [DbfHeader]^-[Dbf4Header]

dBASE.NET - Read and write DBF files with .NET

dBASE.NET is a .NET class library used to read FoxBase, dBASE III and dBASE IV .dbf files. Data read
from a file is returned as a list of typed fields and a list of records. This library is useful to add
data import from dBASE sources to a .NET project.

This code has been tested against a number of dBASE files found in the wild, including FoxBase and dBASE III/IV
files with and without memo files. A .NET unit test project is part of this repository and new test files
may be added to it over time.

Installing dBASE.NET

...

Introduction

Opening a DBF file

using dBASE.NET;

dbf.Read("database.dbf");

This returns an instance of the Dbf class. With this, you can iterate over fields found in the table:

foreach(DbfField field in dbf.Fields) {
	Console.WriteLine(field.Name);
}

You can also iterate over records:

foreach(DbfRecord record in dbf.Records) {
	for(int i = 0;  i < dbf.Fields.Count; i++) {
		Console.WriteLine(record[i]);
	}
}

Count the records:

Console.WriteLine(dbf.Records.Count);

Class diagram

Class diagram

yuml:

http://yuml.me/diagram/scruffy/class/edit/[Dbf]+->[DbfRecord], [Dbf]+->[DbfField], [DbfRecord]+->[DbfField], [Dbf]->[DbfHeader], [DbfHeader]^-[Dbf4Header]

Release Notes

Initial release

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.0.0 591 8/7/2018