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#
  4. Sybase DB access in windows 7

Sybase DB access in windows 7

Scheduled Pinned Locked Moved C#
databasecsharpsysadminhelpquestion
8 Posts 4 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.
  • V Offline
    V Offline
    VenkataRamana Gali
    wrote on last edited by
    #1

    Hi all I am using .net FW 3.5, its desktop applicaiton. MyApplication is fetching data from sybase adoptive server and populating in it. Below connection, code.

    connectionString=DRIVER=MERANT 3.60 32-BIT Sybase;UID=test;DB=db1;SRVR=XYZSERVER;PWD=*****

    using (OdbcConnection connection = new OdbcConnection(connStringFromConfig)
    {
    OdbcDataAdapter adapter = new OdbcDataAdapter(query, onnection);
    connection.Open();
    adapter.Fill(dt);
    connection.Close();
    }

    above code works fine in windows xp. where as same code is not working in windows 7. I am executing in 64bit machine. i got error while opening connection.

    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Anything i am missing ? or do i need to configure anything? appriciated u r quick response.

    Ramana

    Richard Andrew x64R B 2 Replies Last reply
    0
    • V VenkataRamana Gali

      Hi all I am using .net FW 3.5, its desktop applicaiton. MyApplication is fetching data from sybase adoptive server and populating in it. Below connection, code.

      connectionString=DRIVER=MERANT 3.60 32-BIT Sybase;UID=test;DB=db1;SRVR=XYZSERVER;PWD=*****

      using (OdbcConnection connection = new OdbcConnection(connStringFromConfig)
      {
      OdbcDataAdapter adapter = new OdbcDataAdapter(query, onnection);
      connection.Open();
      adapter.Fill(dt);
      connection.Close();
      }

      above code works fine in windows xp. where as same code is not working in windows 7. I am executing in 64bit machine. i got error while opening connection.

      ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

      Anything i am missing ? or do i need to configure anything? appriciated u r quick response.

      Ramana

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      Ramana.Gali wrote:

      where as same code is not working in windows 7. I am executing in 64bit machine.

      What does "not working" mean? Is there an error message?

      The difficult we do right away... ...the impossible takes slightly longer.

      V 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        Ramana.Gali wrote:

        where as same code is not working in windows 7. I am executing in 64bit machine.

        What does "not working" mean? Is there an error message?

        The difficult we do right away... ...the impossible takes slightly longer.

        V Offline
        V Offline
        VenkataRamana Gali
        wrote on last edited by
        #3

        updated error details..

        Ramana

        Richard Andrew x64R 1 Reply Last reply
        0
        • V VenkataRamana Gali

          updated error details..

          Ramana

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          Have you used the 32-bit ODBC Data Source manager to configure the data source name? This happens when you have a 64-bit DSN configured, but not the 32-bit one.

          The difficult we do right away... ...the impossible takes slightly longer.

          V 1 Reply Last reply
          0
          • Richard Andrew x64R Richard Andrew x64

            Have you used the 32-bit ODBC Data Source manager to configure the data source name? This happens when you have a 64-bit DSN configured, but not the 32-bit one.

            The difficult we do right away... ...the impossible takes slightly longer.

            V Offline
            V Offline
            VenkataRamana Gali
            wrote on last edited by
            #5

            OK. then how/what do i configure 32 bit DSN?

            Ramana

            Richard Andrew x64R 1 Reply Last reply
            0
            • V VenkataRamana Gali

              OK. then how/what do i configure 32 bit DSN?

              Ramana

              Richard Andrew x64R Offline
              Richard Andrew x64R Offline
              Richard Andrew x64
              wrote on last edited by
              #6

              You have to run this program:

              c:\windows\sysWOW64\odbcad32.exe

              Don't run the one in Control Panel, cause that will be for 64-bit.

              The difficult we do right away... ...the impossible takes slightly longer.

              R 1 Reply Last reply
              0
              • Richard Andrew x64R Richard Andrew x64

                You have to run this program:

                c:\windows\sysWOW64\odbcad32.exe

                Don't run the one in Control Panel, cause that will be for 64-bit.

                The difficult we do right away... ...the impossible takes slightly longer.

                R Offline
                R Offline
                ralphtrent
                wrote on last edited by
                #7

                Although ODBC will work, have you considered using the Native Sybase ADO.Net driver? Thats what i use when connecting to a Sybase DB: Here is a link to it

                1 Reply Last reply
                0
                • V VenkataRamana Gali

                  Hi all I am using .net FW 3.5, its desktop applicaiton. MyApplication is fetching data from sybase adoptive server and populating in it. Below connection, code.

                  connectionString=DRIVER=MERANT 3.60 32-BIT Sybase;UID=test;DB=db1;SRVR=XYZSERVER;PWD=*****

                  using (OdbcConnection connection = new OdbcConnection(connStringFromConfig)
                  {
                  OdbcDataAdapter adapter = new OdbcDataAdapter(query, onnection);
                  connection.Open();
                  adapter.Fill(dt);
                  connection.Close();
                  }

                  above code works fine in windows xp. where as same code is not working in windows 7. I am executing in 64bit machine. i got error while opening connection.

                  ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

                  Anything i am missing ? or do i need to configure anything? appriciated u r quick response.

                  Ramana

                  B Offline
                  B Offline
                  Bernhard Hiller
                  wrote on last edited by
                  #8

                  Ramana.Gali wrote:

                  connectionString=DRIVER=MERANT 3.60 32-BIT

                  If you installed a 32 bit ODBC driver, you must set the target platform of your solution to x86.

                  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