hamsterdb Embedded Database  2.1.7
Functions
db2.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ham/hamsterdb.h>

Go to the source code of this file.

Functions

void error (const char *foo, ham_status_t st)
 
void usage ()
 
void copy_db (ham_db_t *source, ham_db_t *dest)
 
int main (int argc, char **argv)
 

Function Documentation

void copy_db ( ham_db_t source,
ham_db_t dest 
)
void error ( const char *  foo,
ham_status_t  st 
)

This example opens an Environment and copies one Database into another. With small modifications this sample would also be able to copy In Memory-Environments to On Disk-Environments and vice versa.

Definition at line 29 of file db2.c.

References ham_strerror().

int main ( int  argc,
char **  argv 
)
void usage ( )

Definition at line 35 of file db2.c.

Referenced by main().