Folks,
I am developing an application (using Visual C++) which uses ODBC API to
log and/or retrieve data from an MS/SQL Server database. I'm developing
this on a DEC APLHA Windows NT Workstation, though the final application
will run on an NT server. I'm using MS/SQL 6.0.
My question/problem relates to the SQLConnect() function in ODBC. This
function (and its variants) require that a user login ID and a password
be explicitly specified. So I set up a login ID with the SQL server and in
my program, I open the connection with the login ID and password that I
had set up. Things work fine.
However, I'd like to be able to open the connection for whichever NT
user happens to be running the application (depending on whether the
permissions have been set appropriately in SQL). So I set the security mode
of the SQL server to "Integrated with NT," set up a user group and a user
on the NT workstation, and granted permissions to the users in that
group using SQL Server Security Manager.
There are two problems I am facing:
1. It seems that I still need to specify a password (using Manage Logins
in SQL Enterprise Manager) for these users to log in using programs like
isql (actually ISQL/w). Is this because these programs don't use
trusted connections ? Do I need to install Windows NT Server on my
machine to make this work ? Is it something else ?
2. ODBC does not seem to have a way to connect to a driver with just the
username or the SID or group ID. Is it possible to do so ?
Any help will be much appreciated. If I need to RTFM, please point me
to the correct one, for my attempts so far to divine any solution from
the books online have failed. Regards,
- Amit