Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- From: "William \(Bill\) Vaughn" <billvaNoSpam@xxxxxxxxx>
- Date: Mon, 3 Nov 2008 12:47:53 -0800
Okay, okay... let's add some clarity here.
First let's define some terms. COM means you build code that depends on external COM components that might be replaced (often arbitrarily) AFTER your application has been deployed--even before it runs for the first time. IMHO COM is a big problem in many environments.
OLE DB is a one-size-fits-all (OSFA) set of providers that can access anything from a relational database to a tuna salad (unless it has dill pickles). The spec is as complicated as a pork-filled bill sent out of the House. OLE DB is based on COM (see above). In the past, in order to access SQL Server we used OLE DB to access ODBC (the Kagera bridge) or SQL Server. Today, you can/should use the SNAC OLE DB provider to access SQL Server--but it's still COM.
A telephone is an example of an OSFA provider. However, just because you can dial (or push buttons), it does not mean you can order pizza from that guy in Peru that does not speak English. In a similar way, just because you can connect to MySQL, Paradox, Oracle or FarkleStar databases from an OLE DB or other OSFA provider does not mean your code can interface with these other back-ends. Each has its own unique characteristics, features, weaknesses and strengths. One might support stored procedures, another not. One might support BLOBs or enough capacity to store images in the database, another might not. Some are designed for multi-user architectures, others struggle to support a single user. The differences in administration, performance, capacity, compatibility and everything else make writing an OSFA application of your own a living, breathing nightmare. Yes, it's been done but is the application competitive? It often takes complex multi-tiered architectures that dereference the actual data access interfaces and implementations. Possible? Sure--got a PhD in computer science or a dozen year experience? Got someone who'll pay for this beast?
Accessing ADO via OLEDB (or the OleDb namespace in .NET) is problematic. Yes, it has to traverse the COM interop layer which does NOT map the entire functionality you use to access ADO COM objects in VB6. I documented a half-dozen cases where the COM interop failed to return the same results or was even accepted in .NET code--the only reason some of these applications worked was "side-effect" or unintended functionality exposed by the COM objects created in VB6. In other words, it only worked by accident.
I hope this answers your question.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
____________________________________________________________________________________________
"Mark Worsnop" <MarkWorsnop@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:22440644-8139-423D-B245-AF217D0F0C3A@xxxxxxxxxxxxxxxx
There is 2 different ADO.NET adapters, OleDB and Native SQL. The SQL is a.
direct connection to the SQL Server.
The OleDB I think still uses the COM wrapper.
If it actually does, then why not use the ADO COM?
- Follow-Ups:
- Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- From: Mark Worsnop
- Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- References:
- Is ADO.NET OleDb .NET Data Provider a COM object?
- From: Mark Worsnop
- Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- From: Norman Yuan
- Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- From: Mark Worsnop
- Is ADO.NET OleDb .NET Data Provider a COM object?
- Prev by Date: Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- Next by Date: Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- Previous by thread: Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- Next by thread: Re: Is ADO.NET OleDb .NET Data Provider a COM object?
- Index(es):
Relevant Pages
|