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. The Lounge
  3. Any C++ ODBC developers out there?

Any C++ ODBC developers out there?

Scheduled Pinned Locked Moved The Lounge
csharpc++helpquestion
7 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.
  • G Offline
    G Offline
    gideonvos
    wrote on last edited by
    #1

    I have a custom ADO.NET driver I have developed and it works just fine. However, I was thinking it would be great to be able to expose my data via ODBC as well, so I will need a custom ODBC driver that wraps around an ADO.NET driver, basically an ADO.NET -> ODBC bridge of sorts. I've seen several ODBC toolkits available but not being a C++ programmer I am pretty stuck in doing this myself. Does anyone know of a tool or open source project that offers something similar, an ADO.NET to ODBC bridge?

    R E F 3 Replies Last reply
    0
    • G gideonvos

      I have a custom ADO.NET driver I have developed and it works just fine. However, I was thinking it would be great to be able to expose my data via ODBC as well, so I will need a custom ODBC driver that wraps around an ADO.NET driver, basically an ADO.NET -> ODBC bridge of sorts. I've seen several ODBC toolkits available but not being a C++ programmer I am pretty stuck in doing this myself. Does anyone know of a tool or open source project that offers something similar, an ADO.NET to ODBC bridge?

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #2

      Is there any real business reason why you wan0t to go through the pain? Writing an ODBC driver is very painful. The only thing more painful than writing an ODBC driver is writing an OLEDB provider. If you are already wrapping a C function than probably an ODBC driver is a good idea. In that case your ODBC driver will be a wrapper around the original C functions which your ADO.NET driver wraps.

      Click here to get a Google Wave Invite.

      G 1 Reply Last reply
      0
      • R Rama Krishna Vavilala

        Is there any real business reason why you wan0t to go through the pain? Writing an ODBC driver is very painful. The only thing more painful than writing an ODBC driver is writing an OLEDB provider. If you are already wrapping a C function than probably an ODBC driver is a good idea. In that case your ODBC driver will be a wrapper around the original C functions which your ADO.NET driver wraps.

        Click here to get a Google Wave Invite.

        G Offline
        G Offline
        gideonvos
        wrote on last edited by
        #3

        There is a really good business reason. Pretty much every application that works with data supports reading from an ODBC compliant driver or data source, so it is a big market of potential end-users, unlike my ADO.NET driver which is limited to being used only from within .NET itself. My app is a data provider, not consumer (in which case just using ADO.NET would have been fine). So I need to expose my data to the outside world and ODBC seems to still be the defacto standard after all this time.

        1 Reply Last reply
        0
        • G gideonvos

          I have a custom ADO.NET driver I have developed and it works just fine. However, I was thinking it would be great to be able to expose my data via ODBC as well, so I will need a custom ODBC driver that wraps around an ADO.NET driver, basically an ADO.NET -> ODBC bridge of sorts. I've seen several ODBC toolkits available but not being a C++ programmer I am pretty stuck in doing this myself. Does anyone know of a tool or open source project that offers something similar, an ADO.NET to ODBC bridge?

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          Well, I never managed to figure out the ODBC, however, you can make COM calls to legacy ADO (NOT ADO.NET) which supports ODBC connections ... come to think of it so does ADO.NET. Also, let me say that while I never got direct ODBC working (I gave up after a few hours) the few snippets I found looked lean and mean compared to the VB6 crap I was writing at the time.

          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

          G 1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            Well, I never managed to figure out the ODBC, however, you can make COM calls to legacy ADO (NOT ADO.NET) which supports ODBC connections ... come to think of it so does ADO.NET. Also, let me say that while I never got direct ODBC working (I gave up after a few hours) the few snippets I found looked lean and mean compared to the VB6 crap I was writing at the time.

            Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            G Offline
            G Offline
            gideonvos
            wrote on last edited by
            #5

            Thanks for the reply. Actually I have done heaps with ODBC, even wrote a custom ODBC toolkit back when I used to code in Delphi, to completely replace the dreadful BDE (Borland Database Engine). The problem I have is I don't do C++ and just getting some of the examples I've found to compile is a nightmare. The idea is simple, expose an ADO.NET driver to ODBC clients using a bridge. The main agony will be wrapping the ADO.NET driver into a COM DLL, hosting that inside the C++ ODBC driver, and doing the data translation between C# DataTables and ODBC's own internal structures. Doable, but I am not up to it from the C++ end of things. I have seen some toolkits from DataDirect and Simba, but these cost upwards of $2k, not within my budget, and they still require C++!

            E 1 Reply Last reply
            0
            • G gideonvos

              I have a custom ADO.NET driver I have developed and it works just fine. However, I was thinking it would be great to be able to expose my data via ODBC as well, so I will need a custom ODBC driver that wraps around an ADO.NET driver, basically an ADO.NET -> ODBC bridge of sorts. I've seen several ODBC toolkits available but not being a C++ programmer I am pretty stuck in doing this myself. Does anyone know of a tool or open source project that offers something similar, an ADO.NET to ODBC bridge?

              F Offline
              F Offline
              Fernando A Gomez F
              wrote on last edited by
              #6

              Never tried to build an ODBC driver... still, you could have a look at some existing drivers so you can get an idea on how it looks like. Here's an ODBC driver for SQLite[^], and hopefully you'll find it useful.

              1 Reply Last reply
              0
              • G gideonvos

                Thanks for the reply. Actually I have done heaps with ODBC, even wrote a custom ODBC toolkit back when I used to code in Delphi, to completely replace the dreadful BDE (Borland Database Engine). The problem I have is I don't do C++ and just getting some of the examples I've found to compile is a nightmare. The idea is simple, expose an ADO.NET driver to ODBC clients using a bridge. The main agony will be wrapping the ADO.NET driver into a COM DLL, hosting that inside the C++ ODBC driver, and doing the data translation between C# DataTables and ODBC's own internal structures. Doable, but I am not up to it from the C++ end of things. I have seen some toolkits from DataDirect and Simba, but these cost upwards of $2k, not within my budget, and they still require C++!

                E Offline
                E Offline
                Ennis Ray Lynch Jr
                wrote on last edited by
                #7

                Have you considered just Using a DSN?

                Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                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