Re: OLEDB consumer and 'for xml auto' SELECT

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

From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 02/09/05


Date: Wed, 9 Feb 2005 23:48:29 +0000 (UTC)

George Tihenea (tihenea@comcast.net) writes:
> Here is something I do not get it. OLEDB is suppose to be the best and
> fastest MS technology to get data from a SQL server. It is at the base of
> ADO. So, how the heck nobody saw this problem before?!

Problem and problem. A thing like this does not happen by mistake, but
is surely by design. I guess the idea is to same some bandwidth. Or
maybe even better - a smart client can get the XML into an internal
representation directly.

Obviously, because there is some other way to do it. See
http://www.sqlxml.org/faqs.aspx?faq=1 for one sample.

But you do get a problem if you are accepting any sort of command to
be executed, and you don't know before-hand what is coming back. That's
when you will have to reassemble all that binary stuff yourself.

> And what about ADO.NET? Is it based on the same OLEDB? Does it have the
> same problem?

ADO .Net is very different from ADO in several regards. ADO .Net consists
of a number of data providers, and a part which is independent of the
providers. There are three providers that you can use to access SQL
Server: Odbc Client, OleDB Client and SqlClient. The first two are
wrappers on ODBC and OleDB, whilc SqlClient speaks TDS directly with
SQL Server, and for applications where portability is not of interest,
SqlClient is the main choice. With SqlClient, you get the FOR XML as text.

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • Re: Really want a answer, is there a mature way to access different data providers without performan
    ... I dll can support both SQL server and mysql, ... > You can use OleDB and ODBC also. ... > direct adapter as SqlClient. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Invoking Stored procedure from ADO.NET is slow
    ... The first is that if you are connecting to SQL Server from ADO.NET, ... should be using SqlClient instead of OleDb.Benefits of SQLClient over oledb ... SQLClient certainly is faster than OLEDB; ... nCount = Convert.ToInt32; ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: MS SQL Server
    ... Native for MS SQL Server are OLEDB/ADO, ODBC, ADO.Net. ... If you need easy-to use components, use ADO (ADO Express or dbGo) that you ... If you need speed, try Oledb Direct ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: OLEDB consumer and for xml auto SELECT
    ... To get a FOR XML query back as a string, ... >> fastest MS technology to get data from a SQL server. ... > ADO .Net is very different from ADO in several regards. ... Odbc Client, OleDB Client and SqlClient. ...
    (microsoft.public.data.oledb)
  • RE: DataTable or DataSet? OleDB or Sql..?
    ... If you are using SQL Server, I would recommend using sqlClient and not OleDb. ... > send the result to sql-server. ...
    (microsoft.public.dotnet.framework.aspnet)