Re: dbopen: avoiding config with direct host/port

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4c5qPYcYPWTN45eU0ZYZ+cMgaLm3JU7HBJS5iOEVzKaTw@mail.gmail.com>
2016-04-24 16:53 GMT+01:00 Erik Smith <[email protected]>:
> Is there currently a way to open a connection without referencing the
> config files?  This has been asked before but it's unclear if this is
> possible:
>
> http://lists.ibiblio.org/pipermail/freetds/2010q4/026425.html
>
> There doesn't seem to be a way to do this using this call:
>
> DBPROCESS *dbopen(LOGINREC * login, const char *server)
>
> There are fields within LOGINREC (such as host & port) that could be used
> to override config, but that doesn't seem to be the way it was implemented.
>
> Any ideas?
>
> erik


Fill in LOGINREC as much information you need (like protocol version)
then use <host>:<port> or <host>\<instance> as server. dbopen will try
to read from configuration, fall back to server parsing host and
port/instance then override settings with your LOGINREC informations.

Frediano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.