OdbcDataAdapter OR OleDbDataAdapter
-
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?
-
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?
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
-
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
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.
-
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.
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
-
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
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
-
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
Hey thanks Davey... This will help! :rose:
-
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?
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?