Re: How to specify uid and pwd in odbc.ini?

"James K. Lowden" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Tue, 26 Nov 2013 04:28:45 +0600
?????? ???????? <[email protected]> wrote:

> I came here because I expected on your help, but instead got a story
> that shoot in the leg is hurt, I know about this, let me leave the
> choice, in my case for connect to MS SQL from MariaDB ideal is
> storing passwords in odbc.ini. 

You *are* getting help.  I explained the features, and offered a few
alternatives.  Or did you think it was my job to foresee your desires
before you wrote?  

As far as I know, Microsoft's driver doesn't read passwords from
odbc.ini either.  Using odbc.ini that way would be bad practice and bad
design.  

It's not a matter of choosing not to help.  It's a matter of choosing
what features to devote our time to.  We decided against bothering to
parse passwords from odbc.ini keeping them there creates more problems
than it solves.  

An odbc.ini entry describes a server: the TDS version it supports, the
name of the host, the port.  It does not describe a user.  If you add
the "default user" or somesuch goes in odbc.ini, it opens Pandora's
Box.  What to do about the second user?  What to do about *any* user
who forgets to provide credentials?  

Providing bad defaults leads to unhappy experiences.  Better not to do
it.  

When you think about it, the situations for which keeping user
credentials in odbc.ini works well are quite special.  Yours may be
such a case; I don't know.  I do know that special cases --
particularly when contraindicated by common cases -- belong in 
the application, not the library.  

--jkl
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.