I haven't touched C++ for a long time so not best help; but "NT
AUTHORITY\SYSTEM" means you are running under the systems authentication.
The application in question is it running as an service?
Here are few examples I found:
memset(maxStr, 0x00, sizeof(maxStr));
ReturnCode = ::SQLDriverConnect(m_hdbc, NULL, (SQLCHAR *)tmpStr,
strlen(tmpStr), (SQLCHAR *)maxStr, sizeof(maxStr), &returnSize,
Connection String Example:
** Note they don't mention Trusted Connection when giving UID/PWD.
Sorry I am not much help on programming side :(.
Mohit K. Gupta
B.Sc. CS, Minor Japanese
MCITP: Database Administrator
MCTS: SQL Server 2005