#include <stdio.h>
#include "../dbf.h"
int main( )
{
CDBFTable table;
if ( table.Open("user.dbf") )
{
table.GoTop();
while ( !table.EndOfFile() )
{
if ( !table.Read() ) // read record data
{
// error ...
return -1;
}
printf("%d\n", table.GetInteger("id")); // get integer by field name
printf("%s\n", table.GetChar("name")); // get char by field name
printf("%f\n", table.GetNumeric(2)); // get numeric by field index
unsigned int size;
const void *m = table.GetMemo("note", &size); // get MEMO data
if ( m )
{
// m - MEMO data
// size - MEMO size
// Don't free this memory pointer!
// It will be reallocated during next call and released when table closed.
// Just copy data into your buffer.
}
table.Skip(); // next record
}
table.Close(); // close table
}
return 0;
}
-
Notifications
You must be signed in to change notification settings - Fork 1
GLEB-M/DBF
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Reading Visual FoxPro tables
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published