How do you get odbc working with sqlite on Linux?

Viewed 119

I'm trying to use SQL from Erlang, and the documentation says to use odbc, but I can't find any sources of information that tell me what commands to run to actually launch the odbc server.

Nearly all of them tell me how to configure it, but never say how to actually launch the server, and the man page for the various programs that the odbc package comes with offers no examples.

1 Answers

You can add the odbc app in the list of applications your applications needs to start in your apps .app.src file if using rebar3.

So in the .app.src file if using rebar3 add the odbc application as one of the applications that has be started. example below:

{application, abc,
  [
    {description, "abc application"},
    {vsn, "0.1.0"},
    {registered, []},
    {applications,[kernel,stdlib,odbc]},
    {env,[]},
    {modules, []},
    {maintainers, []},
    {licenses, []},
    {links, []}
  ]
}.

Alternatively you can use

odbc:start().

to start the odbc server manually.

You can have a look at this link from the erlang docs for more information.

Related