Re: XML Datasource

From: Viatcheslav V. Vassiliev (support_at_oledbdirect.com)
Date: 02/11/04


Date: Wed, 11 Feb 2004 20:15:01 +0300


> I'm just wondering if other applications are able to produce
> the expected XML format with the ADO format.

No, ADO loads/saves XML only with its schema. MS SQL Server can return query
as XML with some customization. ADO.Net can save/load in custom format. You
may use XML parser/writer to load/save XML in any format you want -
implementing this is quite easy.

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Emmanuel Barache" <ebarache@hotware.fr> сообщил/сообщила в новостях
следующее: news:402a5335$1@newsgroups.borland.com...
> Thanks for your answer,
>
> I need to reply to a customer that asks me if I'm able to import
> XML files in my app.
>
> My app is currenlty design to import
> - ASCII files
> - BDE files (paradox, dbase ...)
> - ADO datasource thru a TAdoQuery wich connects to t
> he database using a connection string.
>
> My points is to know if I'am able read an XML thru the ADO
> connection (using a TAdoQuery). If not, It would not cost a lot
> to add an XML datasource using the LoadFromFile method.
> I'm just wondering if other applications are able to produce
> the expected XML format with the ADO format.
>
> --
> Best regards,
>
> Emmanuel Barache
> HotWare
> ebarache@hotware.fr
>
>
> "Viatcheslav V. Vassiliev" <support@oledbdirect.com> a Иcrit dans le
message
> de news: 402a46c9@newsgroups.borland.com...
> > ADO expects XML in its own format - open any query and save result with
> > SaveToFile. Custom formats that does not confirm ADO schema are not
> > supported.
> >
> > //------------------------------------------
> > Regards,
> > Vassiliev V. V.
> > http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
> > ADO.Net
> > http://www.oledbdirect.com - The fastest way to access MS SQL Server,
> > MS Jet (Access) and Interbase (through OLEDB)
> >
> > "Emmanuel Barache" <ebarache@hotware.fr> сообщил/сообщила в новостях
> > следующее: news:402a41c0$1@newsgroups.borland.com...
> > > Thanx,
> > >
> > > I tried to implement your strategy but the loadfromfile method
produces
> a
> > > message like :
> > >
> > > The recordset object could not be created. XML source is incomplete or
> not
> > > valid.
> > > (approximately translated from french)
> > >
> > > I tried this XML data provided with Delphi 7 (country.xml, biolife.xml
> > > ....).
> > > Those file seems to contain wanted structure (metadata header with
field
> > > description
> > > and data ...).
> > >
> > > What is wrong ?
> > >
> > > I would be happy to know if it's possible to work with a standard
> > connection
> > > string
> > > because we built a generic ADO interface where a TAdoQuery is
connected
> to
> > > an Ado Database using the standard ADO connection wizard, in order to
> help
> > > the user
> > > to build the connection string.
> > >
> > > --
> > > Best regards,
> > >
> > > Emmanuel Barache
> > > HotWare
> > > ebarache@hotware.fr
> > >
> > >
> > > "Guillem" <keinname@eresmas.net> a Иcrit dans le message de news:
> > > 402a1dc5@newsgroups.borland.com...
> > > >
> > > > > I would like to be able to connect to a XML datasource using OLE
DB.
> > > > > This seems to be able thru the OLE DB Simple provider but
> > > > > I don't know how to do.
> > > > > What would the connection string look like to connect to a local
> > > > > XML File ?
> > > > >
> > > >
> > > > You don't really need a connection string. If you've got an XML file
> > with
> > > > all data and metadata (field info and so on), then you can use
> > > LoadFromFile
> > > > and SaveToFile methods present in ADO components. Best options for
> this
> > > are
> > > > TADODataset and TADOTable.
> > > >
> > > > Your code would have something like this:
> > > >
> > > > TADODataset.LoadFromFile('myFile.xml'); //for loading from xml file
> > > > //...
> > > > TADODataset.SaveToFile('myFile.xml'); //for saving again to xml file
> > > >
> > > > Doing the first you load onto your dataset all the data. Then you
can
> do
> > > > whatever you need and save it again to the file.
> > > >
> > > > > Do I need some additional middleware to be able to do ?
> > > >
> > > > Nop. Only the ADO components present in Delphi
> > > >
> > > > Best regards
> > > > Guillem
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: XML Datasource
    ... he database using a connection string. ... My points is to know if I'am able read an XML thru the ADO ... the expected XML format with the ADO format. ...
    (borland.public.delphi.database.ado)
  • Re: ADo XML
    ... I don't believe you can change the format that ADO uses, ... able to use XSLT to transform the XML produced by ADO into another format. ...
    (microsoft.public.data.ado)
  • Re: Sane Syntax
    ... vital role in the future of TeX but we need some more human friendly ... Generating well formed LaTeX2e documents from XML ... Another approach is to convert existing documents to XML format and go ... TEI, together with DocBook, are the two ...
    (comp.text.tex)
  • Re: XHTML vs HTML
    ... to be the predominant type of HTML used on the web for many years yet. ... First, it is XML. ... XHTML is also ... transformed using XSL from and into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)
  • Re: text to bibliography?
    ... to xml: you can store binary data in an xml file. ... including your well-formattedbibliography(no longer in xml format). ... It is in annotated bibliographies (something Word 2007 does not ... that %I is actually the field representing the publisher. ...
    (microsoft.public.word.docmanagement)