mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-01-21 18:48:34 +08:00
Combine functions that bind a column and its length
This commit is contained in:
@@ -450,7 +450,7 @@ gmdb_sql_execute_cb(GtkWidget *w, GladeXML *xml)
|
||||
for (i=0;i<sql->num_columns;i++) {
|
||||
bound_data[i] = (char *) malloc(MDB_BIND_SIZE);
|
||||
bound_data[i][0] = '\0';
|
||||
mdb_sql_bind_column(sql, i+1, bound_data[i]);
|
||||
mdb_sql_bind_column(sql, i+1, bound_data[i], NULL);
|
||||
sqlcol = g_ptr_array_index(sql->columns,i);
|
||||
column = gtk_tree_view_column_new_with_attributes(sqlcol->name, renderer, "text", i, NULL);
|
||||
gtk_tree_view_append_column(GTK_TREE_VIEW (treeview), column);
|
||||
|
||||
@@ -90,7 +90,7 @@ GMdbDataWindow *dataw = NULL;
|
||||
/* bind columns */
|
||||
bound_data[i] = (char *) malloc(MDB_BIND_SIZE);
|
||||
bound_data[i][0] = '\0';
|
||||
mdb_bind_column(table, i+1, bound_data[i]);
|
||||
mdb_bind_column(table, i+1, bound_data[i], NULL);
|
||||
|
||||
/* display column titles */
|
||||
col=g_ptr_array_index(table->columns,i);
|
||||
|
||||
@@ -190,7 +190,7 @@ int rows=0;
|
||||
/* bind columns */
|
||||
bound_data[i] = (char *) malloc(MDB_BIND_SIZE);
|
||||
bound_data[i][0] = '\0';
|
||||
mdb_bind_column(table, i+1, bound_data[i]);
|
||||
mdb_bind_column(table, i+1, bound_data[i], NULL);
|
||||
|
||||
/* display column titles */
|
||||
col=g_ptr_array_index(table->columns,i);
|
||||
|
||||
Reference in New Issue
Block a user