I have struggled with getting the SQLCA properties set up correct to be able to have my users connect to data base with single sign-on/trusted connection. I'm on MS SQL Server.
The problem boiled down to using correct value for SQLCA.DBMS. Thank to a thread here i found that I could use SNC for SQL Native Client. Also ADO and ODB is working fine on my developer machine. (I also learned to add TRACE before the provider name. Very useful!)
I think what values are working relies on what providers are installed on the computer.
I failed to find any documentation that describes in detail the valid values for SQLCA.DBMS and what corresponding software/drivers/providers need to be installed on the users computers.
This is the code I use to connect to the database:
SQLCA.DBMS = 'SNC'
SQLCA.DBParm = "Namespace='System.Data.SqlClient'"
SQLCA.DBParm += ",DataSource='server_name'"
SQLCA.DBParm += ",Database='db_name'"
SQLCA.DBParm += ",TrustedConnection=1"
//I found that setting LogId and LogPass to empty string was not necessary, but maybe safer?
//SQLCA.LogId = ''
//SQLCA.LogPass = ''
Are there any docs or tutorials around that goes into details on this subject?