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. Database & SysAdmin
  3. Database
  4. OdbcDataAdapter OR OleDbDataAdapter

OdbcDataAdapter OR OleDbDataAdapter

Scheduled Pinned Locked Moved Database
csharpdatabasequestion
7 Posts 3 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
    Salil Khedkar
    wrote on last edited by
    #1

    I am designing a new application and I don't want to confine it to a specific database system. So when I want to choose a Data adapter in C#.NET, my options are OdbcDataAdapter OR OleDbDataAdapter. Can anybody explain me the different between the two or give me a link where I can learn abut the difference?

    D S 2 Replies Last reply
    0
    • S Salil Khedkar

      I am designing a new application and I don't want to confine it to a specific database system. So when I want to choose a Data adapter in C#.NET, my options are OdbcDataAdapter OR OleDbDataAdapter. Can anybody explain me the different between the two or give me a link where I can learn abut the difference?

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

      OleDBDataAdapter is optimized for OleDB data sources, whereas OdbcDataAdapter is optimized for ODBC data sources, so I suppose it depends on which you are using. The following link form MS gives a bit more info. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbcondataadapters.asp[^]


      store your internet favourites online - www.my-faves.co.uk

      S 1 Reply Last reply
      0
      • D David Salter

        OleDBDataAdapter is optimized for OleDB data sources, whereas OdbcDataAdapter is optimized for ODBC data sources, so I suppose it depends on which you are using. The following link form MS gives a bit more info. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbcondataadapters.asp[^]


        store your internet favourites online - www.my-faves.co.uk

        S Offline
        S Offline
        Salil Khedkar
        wrote on last edited by
        #3

        No, I am sorry. The information with the MSDN page is not sufficient. I have already gone through that. It just tells me the following difference: - The OleDbDataAdapter object is suitable for use with any data source exposed by an OLE DB provider. - The OdbcDataAdapter object is optimized for accessing ODBC data sources. But does not explain in scenarios where both OLE and ODBC providers are available (e.g. MS SQL Server and Oracle) what should I go for. What are the merits/demerits of each etc.

        D 1 Reply Last reply
        0
        • S Salil Khedkar

          No, I am sorry. The information with the MSDN page is not sufficient. I have already gone through that. It just tells me the following difference: - The OleDbDataAdapter object is suitable for use with any data source exposed by an OLE DB provider. - The OdbcDataAdapter object is optimized for accessing ODBC data sources. But does not explain in scenarios where both OLE and ODBC providers are available (e.g. MS SQL Server and Oracle) what should I go for. What are the merits/demerits of each etc.

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

          Supposedly OleDb is faster thsn Odbc because it has to go through fewer layers between your application and database. In my experience however, this hasn't been the case - they appear to be equal, with the Odbc giving better support for Oracle (although Oracle now provide ODP.NET which should adjust things). If you google for OLEDB v's ODBC, you'll see several discussions of this sort. http://www.google.co.uk/search?q=OleDB+vs+ODBC&hl=en&lr=&ie=UTF-8&start=0&sa=N


          store your internet favourites online - www.my-faves.co.uk

          C S 2 Replies Last reply
          0
          • D David Salter

            Supposedly OleDb is faster thsn Odbc because it has to go through fewer layers between your application and database. In my experience however, this hasn't been the case - they appear to be equal, with the Odbc giving better support for Oracle (although Oracle now provide ODP.NET which should adjust things). If you google for OLEDB v's ODBC, you'll see several discussions of this sort. http://www.google.co.uk/search?q=OleDB+vs+ODBC&hl=en&lr=&ie=UTF-8&start=0&sa=N


            store your internet favourites online - www.my-faves.co.uk

            C Offline
            C Offline
            cmk
            wrote on last edited by
            #5

            I'm pretty sure the original OLE DB used to call the ODBC drivers. Now i think both are developed in parallel - neither depends on the other. I had always heard/thought the opposite, ODBC is a simpler C API design that has fewer layers. I tend to believe this as i've seen internal COM calling diagrams - i can't believe it is a thinner API. I still consider ODBC to be a cleaner/faster interface, but OLE DB is more abstract - it allows connections to excel spreadsheets, text files, ... I tend to still use ODBC for most projects. The only place i'm actually using OLE DB right now is for WinCE development - and that's because it doesn't support ODBC. ...cmk Save the whales - collect the whole set

            1 Reply Last reply
            0
            • D David Salter

              Supposedly OleDb is faster thsn Odbc because it has to go through fewer layers between your application and database. In my experience however, this hasn't been the case - they appear to be equal, with the Odbc giving better support for Oracle (although Oracle now provide ODP.NET which should adjust things). If you google for OLEDB v's ODBC, you'll see several discussions of this sort. http://www.google.co.uk/search?q=OleDB+vs+ODBC&hl=en&lr=&ie=UTF-8&start=0&sa=N


              store your internet favourites online - www.my-faves.co.uk

              S Offline
              S Offline
              Salil Khedkar
              wrote on last edited by
              #6

              Hey thanks Davey... This will help! :rose:

              1 Reply Last reply
              0
              • S Salil Khedkar

                I am designing a new application and I don't want to confine it to a specific database system. So when I want to choose a Data adapter in C#.NET, my options are OdbcDataAdapter OR OleDbDataAdapter. Can anybody explain me the different between the two or give me a link where I can learn abut the difference?

                S Offline
                S Offline
                Salil Khedkar
                wrote on last edited by
                #7

                Thanks guys. I got some amount of info but it mainly described the concept behind OLEDB and ODBC technologies, like: ODBC is Open Data Base Connectivity, which is a connection method to data sources and other things. It requires that you set up a data source, or what's called a DSN using an SQL driver or other driver if connecting to other database types. Most database systems support ODBC. OLE is Object Linking and Embedding. OLEDB is partly distinguished from OLE itself, now called "automation". OLEDB is the successor to ODBC, a set of software components that allow a "front end" such as GUI based on VB, C++, Access or whatever to connect with a back end such as SQL Server, Oracle, DB2, mySQL etal. In many cases the OLEDB components offer much better performance than the older ODBC. OLEDB is a different type of data provider that came about with MS's Universal Data Access in 1996 and does not require that you set up a DSN. It is commonly used when building VB apps and is closely tied to ADO. It works with COM, and DCOM as of SQL 7.0. However my quetion is more related with the .NET classes provieded for the same. If I don't want to get tied to a specific database, what is the better choice: OdbcDataAdapter OR OleDbDataAdapter in terms of performance and scalability?

                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