void dbadd2db ( Dbptr dbin, Arr *records, int flags, Dbptr dbout, Dbptr dbconflict );
If conflicts arise, the conflicting records from the input database are copied to the dbconflict database; these must be resolved manually. (Duplicate records are not conflicts and are not copied).
void merge_stations ( Dbptr station_view, Dbptr dbout, Dbptr dbconflict) { Arr *arr = 0 ; long nstations ; dbquery ( station_view, dbRECORD_COUNT, &nstations ) ; if ( nstations > 0 ) { dbuntangle ( station_view, &arr ) ; dbadd2db ( station_view, arr, 0, dbout, dbconflict ) ; dbfree_untangle(arr) ; } else { complain ( 0, "no records in station_view" ) ; } }
dbuntangle(3)