/*
- * Copyright (C) 2012 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2012-2019 Andrea Zagli <azagli@libero.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <config.h>
#endif
+#include <glib/gprintf.h>
+
#include <libgda/libgda.h>
#include <sql-parser/gda-sql-parser.h>
sql = g_strdup_printf ("SELECT * FROM %s",
table->name);
error = NULL;
- dm = gda_execute_select_command (gda_conn_ref_db,
- sql,
- &error);
+ dm = gda_connection_execute_select_command (gda_conn_ref_db,
+ sql,
+ &error);
g_free (sql);
if (dm != NULL && error == NULL)
{
store = gda_connection_get_meta_store (gda_conn_ref_db);
mstruct = gda_meta_struct_new (store, GDA_META_STRUCT_FEATURE_NONE);
dbo = gda_meta_struct_complement (mstruct, GDA_META_DB_TABLE,
- NULL, NULL,
+ NULL, NULL,
gval, &error);
gda_value_free (gval);
else
{
error = NULL;
- if (!gda_server_operation_set_value_at (op, view_name, &error,
+ if (!gda_server_operation_set_value_at (op, view_name, &error,
"/VIEW_DESC_P/VIEW_NAME"))
{
g_warning ("Error on setting GdaServerOperation's value: %s.",
store = gda_connection_get_meta_store (gda_conn_ref_db);
mstruct = gda_meta_struct_new (store, GDA_META_STRUCT_FEATURE_NONE);
dbo = gda_meta_struct_complement (mstruct, GDA_META_DB_VIEW,
- NULL, NULL,
+ NULL, NULL,
gval, &error);
gda_value_free (gval);
}
error = NULL;
- if (!gda_server_operation_set_value_at (op, view_name, &error,
+ if (!gda_server_operation_set_value_at (op, view_name, &error,
"/VIEW_DEF_P/VIEW_NAME"))
{
g_warning ("Error on setting GdaServerOperation's value: %s.",
}
error = NULL;
- if (!gda_server_operation_set_value_at (op, view_def, &error,
+ if (!gda_server_operation_set_value_at (op, view_def, &error,
"/VIEW_DEF_P/VIEW_DEF"))
{
g_warning ("Error on setting GdaServerOperation's value: %s.",
GError *error;
GOptionContext *context;
- g_type_init ();
-
error = NULL;
context = g_option_context_new ("- copy from a database to another one");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);