 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Emmanuel Barache Guest
|
Posted: Wed Feb 11, 2004 11:34 am Post subject: XML Datasource |
|
|
Hello,
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 ?
Do I need some additional middleware to be able to do ?
--
Best regards,
Emmanuel Barache
HotWare
[email]ebarache (AT) hotware (DOT) fr[/email]
|
|
| Back to top |
|
 |
Guillem Guest
|
Posted: Wed Feb 11, 2004 12:19 pm Post subject: Re: XML Datasource |
|
|
| Quote: | 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.
| Quote: | Do I need some additional middleware to be able to do ?
|
Nop. Only the ADO components present in Delphi
Best regards
Guillem
|
|
| Back to top |
|
 |
Emmanuel Barache Guest
|
Posted: Wed Feb 11, 2004 2:52 pm Post subject: Re: XML Datasource |
|
|
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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Guillem" <keinname (AT) eresmas (DOT) net> a Иcrit dans le message de news:
[email]402a1dc5 (AT) newsgroups (DOT) borland.com[/email]...
| Quote: |
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
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Wed Feb 11, 2004 3:14 pm Post subject: Re: XML Datasource |
|
|
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 (AT) hotware (DOT) fr> сообщил/сообщила в новостях
следующее: news:402a41c0$1 (AT) newsgroups (DOT) borland.com...
| Quote: | 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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Guillem" <keinname (AT) eresmas (DOT) net> a Иcrit dans le message de news:
[email]402a1dc5 (AT) newsgroups (DOT) borland.com[/email]...
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
|
|
|
| Back to top |
|
 |
Emmanuel Barache Guest
|
Posted: Wed Feb 11, 2004 4:07 pm Post subject: Re: XML Datasource |
|
|
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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> a Иcrit dans le message
de news: [email]402a46c9 (AT) newsgroups (DOT) borland.com[/email]...
| Quote: | 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 (AT) hotware (DOT) fr> сообщил/сообщила в новостях
следующее: news:402a41c0$1 (AT) newsgroups (DOT) 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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Guillem" <keinname (AT) eresmas (DOT) net> a Иcrit dans le message de news:
[email]402a1dc5 (AT) newsgroups (DOT) borland.com[/email]...
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
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Wed Feb 11, 2004 5:15 pm Post subject: Re: XML Datasource |
|
|
| Quote: | 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 (AT) hotware (DOT) fr> сообщил/сообщила в новостях
следующее: news:402a5335$1 (AT) newsgroups (DOT) borland.com...
| Quote: | 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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> a Иcrit dans le
message
de news: [email]402a46c9 (AT) newsgroups (DOT) borland.com[/email]...
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 (AT) hotware (DOT) fr> сообщил/сообщила в новостях
следующее: news:402a41c0$1 (AT) newsgroups (DOT) 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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Guillem" <keinname (AT) eresmas (DOT) net> a Иcrit dans le message de news:
[email]402a1dc5 (AT) newsgroups (DOT) borland.com[/email]...
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
|
|
|
| Back to top |
|
 |
Mike Shkolnik Guest
|
Posted: Wed Feb 11, 2004 8:48 pm Post subject: Re: XML Datasource |
|
|
Check SMImport suite: http://www.scalabium.com/smi
There are supported a lot of file formats including XML, HTML, MS Excel, MS
Access, Paradox and dBase (without BDE) etc
--
With best regards, Mike Shkolnik
E-mail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
WEB: http://www.scalabium.com
"Emmanuel Barache" <ebarache (AT) hotware (DOT) fr> wrote
| Quote: | 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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> a Иcrit dans le
message
de news: [email]402a46c9 (AT) newsgroups (DOT) borland.com[/email]...
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 (AT) hotware (DOT) fr> сообщил/сообщила в новостях
следующее: news:402a41c0$1 (AT) newsgroups (DOT) 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
[email]ebarache (AT) hotware (DOT) fr[/email]
"Guillem" <keinname (AT) eresmas (DOT) net> a Иcrit dans le message de news:
[email]402a1dc5 (AT) newsgroups (DOT) borland.com[/email]...
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
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|