ODBC connection string for SQL Server 2005
-
I have an application developed on VS6 that I used to connect to an SQL Server 2000 without problem. Due to some system upgrades, now I have to establish the connection to an SQL Server 2005 at the same database. The connection string remains the same: "DSN=DSN_NAME;UID=user_name;PWD=password" At the OpenEx function of the CDatabase object I get the following error: "Unhandled exception in myexe.exe (DSSENH.DLL): 0xC0000005. Access Violation." Does anyone know anything about the issue? Thanks in Advance :)
-
I have an application developed on VS6 that I used to connect to an SQL Server 2000 without problem. Due to some system upgrades, now I have to establish the connection to an SQL Server 2005 at the same database. The connection string remains the same: "DSN=DSN_NAME;UID=user_name;PWD=password" At the OpenEx function of the CDatabase object I get the following error: "Unhandled exception in myexe.exe (DSSENH.DLL): 0xC0000005. Access Violation." Does anyone know anything about the issue? Thanks in Advance :)
sirtimid wrote:
At the OpenEx function of the CDatabase object I get the following error: "Unhandled exception in myexe.exe (DSSENH.DLL): 0xC0000005. Access Violation." Does anyone know anything about the issue?
Have you stepped into the
OpenEx()
call to find the offending statement?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
sirtimid wrote:
At the OpenEx function of the CDatabase object I get the following error: "Unhandled exception in myexe.exe (DSSENH.DLL): 0xC0000005. Access Violation." Does anyone know anything about the issue?
Have you stepped into the
OpenEx()
call to find the offending statement?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
Yes I have...the error was in line: AFX_SQL_SYNC(::SQLDriverConnect(m_hdbc, hWnd, (UCHAR*)T2A((LPTSTR)(LPCTSTR)m_strConnect), SQL_NTS, szConnectOutput, _countof(szConnectOutput), &nResult, wConnectOption)); in the Connect function of CDatabase class.
So are the arguments being passed to
SQLDriverConnect()
andAFX_SQL_SYNC()
valid?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
So are the arguments being passed to
SQLDriverConnect()
andAFX_SQL_SYNC()
valid?"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne