I recently moved my dev. environment from XP to windows 7 64 bit. We still need to use VS 2003.NET due to old library compatibility, which isn't an issue.
I have a Windows Service project which uses an ODBC library we have to connect to a database. Here's where the strange starts happening. For whatever reason, I am unable to get a connection to the database (local or on the network) via the service in windows 7. On an XP machine, it works just fine.
Other apps that use the exact same library are able to connect as well (local or network), but for whatever reason, the service in windows 7 cannot connect. The connection statement used is below:
sql_ret = SQLDriverConnect(m_sqlConn, NULL, (SQLCHAR*)m_szConnectParam.c_str(),
SQL_NTS, (SQLCHAR*)szConnectOutput, HUGE_STR,
&nResult,
SQL_DRIVER_NOPROMPT);
sql_ret comes back as -1. No other errors or indications are given. Again, this same exact line is used to successfully connect from other C++ dialog apps in Windows 7.
I have tried multiple accounts as well (networkservice, admin, local account) but nothing seems to work. Hope you can help!
Thanks