Hi Sven and Allin,
thanks for your responses.
Am 20.02.20 um 17:16 schrieb Allin Cottrell:
On Wed, 19 Feb 2020, atecon wrote:
> for the first time I am working with gretl's ODBC connector. So far it seems
> to work fine for standard queries using the Exasol data base on linux.
> However, I stumbled over to 2 issues:
>
> 1) I want to write a open_odbc_connection() function. Unfortunately, the
> 'open' command cannot be executed within a function. For its standard
> application loading a data set I fully understand the reason. However, for
> just opening a ODBC connection by the '--odbc" option, I don't get
rational
> for this restriction.
> Feature request: Allow making use of the open command in case the --odbc
> option is passed.
OK, that's now in git. We allow within functions "non-destructive"
usage of the "open" command. This includes the --odbc option as well
as "open dbnomics" and "open <db>" where <db> is a native
gretl
database file (e.g. "open fedstl.bin").
Thank you for that -- this is
useful.
One remaining point: Is there a possibility to close a ODBC connection
without closing gretl or executing the "clear" command? The reason is
that institutions/ companies may only support a limit number of open
DB-connections, and thus it's good habit to close the DB-connection once
it is not needed any more. Currently the workaround is: load data from
DB, store it, clear/ close the gretl session, re-open and load again
(the probably large file).
> 2) While loading data through the 'data' command, e.g. by
executing <data x
> query="@statement" --odbc>, this command does not seem to work in case
one
> wants to send a 'statement' -- like "create table" or "drop
table" -- to the
> database which does not return a series.
> Feature request: allow sending a sql-statement which does not return a series
> or anything.
Like Sven, I'm not sure that manipulating a database, as opposed to
simply reading from it, is gretl's business.
Maybe you're right. Of course
writing a wrapper executing some
shell-command using for instance the tool "isql" or executing some
Python-job is doable.
Thank you both,
Artur