Ben
--
You received this message because you are subscribed to the Google Groups "SWI-Prolog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swi-prolog+...@googlegroups.com.
On 08/20/2014 03:25 PM, Ben Engbers wrote:
> I have an application which connects to a database. To open the database
> I use "odbc_connect(<DSNname>, _, [user(<username>),
> alias(<aliasname>), open(once)])"
>
> Is it possible to define DSNname, username and aliasname in a ini-file.
> load this ini-file in the .pl and use odbc_connect with the names that
> are defined in the ini-file?
> What is the best approach to do this?
At least using unixODBC, you can put the credentials in .odbc.ini and
only specify the DSN. This has, AFAIK, nothing to do with Prolog,
but with the ODBC setup. Of course, you can parse a .ini file in
Prolog and grab the user/password from there as a work-around.
Cheers --- Jan
>
> Ben