Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ODBC connection string for SQL Server 2005

ODBC connection string for SQL Server 2005

Scheduled Pinned Locked Moved C / C++ / MFC
helpdatabasesql-serversysadminquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sirtimid
    wrote on last edited by
    #1

    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 :)

    D 1 Reply Last reply
    0
    • S sirtimid

      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 :)

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      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

      S 1 Reply Last reply
      0
      • D David Crow

        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

        S Offline
        S Offline
        sirtimid
        wrote on last edited by
        #3

        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.

        D 1 Reply Last reply
        0
        • S sirtimid

          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.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          So are the arguments being passed to SQLDriverConnect() and AFX_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

          S 1 Reply Last reply
          0
          • D David Crow

            So are the arguments being passed to SQLDriverConnect() and AFX_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

            S Offline
            S Offline
            sirtimid
            wrote on last edited by
            #5

            As much as I see, there is no argument with unspecified value. They all have a valid value.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups