A: 

For what it's worth, I'm not sure checking the authentication mode prior to attempting a connection is going to help.

If the authentication mode is Windows Auth, you won't know until you try to connect whether the identity of the current user has login rights.

If the authentication mode is Mixed Auth, there's no guarantee that the account & password you specify is going to work either - so I don't think you have an alternative but to use trial and error.

RobS
Yeh, thanks for that - I get that feeling too.The only reason I want to know what the mode is, is so I can build the appropriate connect string, beyond that, failing to connect because of no login rights is a valid outcome.
Stuart Helwig
I would stick with the trial and error method. It will be the most reliable.
mrdenny
I completely disagree with this answer. For security purposes, Microsoft generally returns only an 18452 or 18456 error to clients. This is not enough to determine if the problem is due to mixed-mode authentication, a common cause of connection problems. Therefore, being able to programmatically determine if Mixed Mode is enabled before attempting to connect with a SQL Server username/password ensures a better user experience. Can anyone answer the original question?
GuyBehindtheGuy
I'm not sure what you want to hear. The answer was 'trial and error'. No one is debating the validity of the approach.
RobS