Re: OLEDB consumer and 'for xml auto' SELECT

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Uwa Agbonile [MSFT] (uwaag_at_online.microsoft.com)
Date: 02/13/05


Date: Sat, 12 Feb 2005 18:23:22 -0800

To get a FOR XML query back as a string, request ISequentialStream and read
the stream as DBTYPE_STR and you should get back the regular xml text.

-- 
This posting is provided "AS IS" with no warranties, and confers no rights.
Regards,
Uwa Agbonile[MSFT]
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns95F97F3D6618Yazorman@127.0.0.1...
> 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: OLEDB consumer and for xml auto SELECT
    ... ADO .Net is very different from ADO in several regards. ... Odbc Client, OleDB Client and SqlClient. ... SQL Server, and for applications where portability is not of interest, ...
    (microsoft.public.data.oledb)
  • Re: Grosse Datenmenge - XML Import in Datenbank
    ... Der XML Import in Access über ADO ist nicht wirklich empfehlenswert, ... Muss es XML sein? ... SQL Server bietet mit BULK INSERT ebenfalls ein Werkzeug für einen ...
    (microsoft.public.de.inetserver.iis.asp)
  • Re: Need security advice on xp_cmdshell, bcp, xml procedure
    ... > through each 2033 char return results and create the XML file from the ... XML in ADO with SQLOLEDB is to use the Stream object. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: XML file to ADO table
    ... TADOTable.LoadFromFile - XML should be in format that is supported by ADO ... Vassiliev V. V. ... http://www.oledbdirect.com - The fastest way to access MS SQL Server, ...
    (borland.public.delphi.database.ado)
  • Re: Is ADO Dead (3)?
    ... ADO.NET for the ADO Programmer ... disconnected from the data source? ... How do I use ADO.NET with XML, ... retrieval and updates, in the .NET Framework? ...
    (comp.databases.ms-access)