mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
broken pipe on commit, see previous log
This commit is contained in:
@@ -237,21 +237,6 @@ dump_results(MdbSQL *sql)
|
||||
fprintf(stdout, "%s", sqlcol->name);
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
if (sql->kludge_ttable_pg) {
|
||||
memcpy(mdb->pg_buf, sql->kludge_ttable_pg, fmt->pg_size);
|
||||
rows = mdb_pg_get_int16(mdb,fmt->row_count_offset);
|
||||
for (i = 0; i < rows; i++) {
|
||||
rc = mdb_read_row(sql->cur_table, i);
|
||||
row_count++;
|
||||
for (j=0;j<sql->num_columns-1;j++) {
|
||||
sqlcol = g_ptr_array_index(sql->columns,j);
|
||||
fprintf(stdout, "%s%s", sql->bound_values[j], delimiter);
|
||||
}
|
||||
sqlcol = g_ptr_array_index(sql->columns,sql->num_columns-1);
|
||||
fprintf(stdout, "%s", sql->bound_values[sql->num_columns-1]);
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
}else {
|
||||
while(mdb_fetch_row(sql->cur_table)) {
|
||||
row_count++;
|
||||
for (j=0;j<sql->num_columns-1;j++) {
|
||||
@@ -262,7 +247,6 @@ dump_results(MdbSQL *sql)
|
||||
fprintf(stdout, "%s", sql->bound_values[sql->num_columns-1]);
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
}
|
||||
if (footers) {
|
||||
if (!row_count)
|
||||
fprintf(stdout, "No Rows retrieved\n");
|
||||
@@ -307,6 +291,7 @@ dump_results_pp(MdbSQL *sql)
|
||||
fprintf(stdout,"\n");
|
||||
|
||||
/* print each row */
|
||||
/*
|
||||
if (sql->kludge_ttable_pg) {
|
||||
memcpy(mdb->pg_buf, sql->kludge_ttable_pg, fmt->pg_size);
|
||||
rows = mdb_pg_get_int16(mdb,fmt->row_count_offset);
|
||||
@@ -319,8 +304,8 @@ dump_results_pp(MdbSQL *sql)
|
||||
}
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
} else {
|
||||
while(mdb_fetch_row(sql->cur_table)) {
|
||||
*/
|
||||
while(mdb_sql_fetch_row(sql, sql->cur_table)) {
|
||||
row_count++;
|
||||
for (j=0;j<sql->num_columns;j++) {
|
||||
sqlcol = g_ptr_array_index(sql->columns,j);
|
||||
@@ -328,7 +313,6 @@ dump_results_pp(MdbSQL *sql)
|
||||
}
|
||||
fprintf(stdout,"\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* footer */
|
||||
for (j=0;j<sql->num_columns;j++) {
|
||||
|
||||
Reference in New Issue
Block a user