Re: Is ADO.NET OleDb .NET Data Provider a COM object?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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?

.



Relevant Pages

  • Re: SqlServer 2005 Transfer Flame
    ... database between the two servers. ... I do understand your concerns with SQL Server 2005. ... Drag a OLE DB Destination to the panel; ...
    (microsoft.public.sqlserver.dts)
  • Re: a view based on stored procedure
    ... Columnist, SQL Server Professional ... When I execute the stored procedure in Query Analyzer, ... OLE DB error trace [Non-interface error: OLE DB provider unable to process ... In the stored procedure, I am selecting data from 2 views, opening a cursor, ...
    (microsoft.public.sqlserver.programming)
  • Re: merge field only shows 28 of 30 characters
    ... I've tried both OLE DB and ODBC connections, and both the old SQL Server client and the newer Native Client. ... If you are actually seeing two question marks at the end instead of the two characters you expect, the problem probably results from the "character translation" settings. ... for the database concerned. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Authentication methods for connections to SQL Server in ASP Pa
    ... Microsoft OLE DB Provider for SQL Server error '80004005' ... Multiple-step OLE DB operation generated errors. ... These errors are probably because there is no 'Provider' keyword in your ...
    (microsoft.public.sqlserver.security)
  • Re: Samplclnt example in MDAC 2.8: My Story
    ... It's funny how Microsoft appears to be pushing OLE DB hard, ... > people seem reluctant to abandon ODBC, and again, I've heard from ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.data.oledb)