Re: XML Datasource
From: Viatcheslav V. Vassiliev (support_at_oledbdirect.com)
Date: 02/11/04
- Next message: Tiago A. de Andrade: "ADO and TClientDataSet"
- Previous message: Yannis Makarounis: "Getting the properties of the DB tables"
- In reply to: Emmanuel Barache: "Re: XML Datasource"
- Next in thread: Mike Shkolnik: "Re: XML Datasource"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Tiago A. de Andrade: "ADO and TClientDataSet"
- Previous message: Yannis Makarounis: "Getting the properties of the DB tables"
- In reply to: Emmanuel Barache: "Re: XML Datasource"
- Next in thread: Mike Shkolnik: "Re: XML Datasource"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|