Re: OleDb Connection to XML File
- From: Jason Barnett <JasonBarnett@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 4 Dec 2008 08:05:01 -0800
I've built an assembly that processes "Job" objects. A Job object stores
information about an automated task. This Job object could have a collection
of parameters that are needed to run, and those parameters are fed by the
executing assembly. The executing assembly I'm currently developing is a
Singleton-like web service designed to run a collection of Job objects. I'm
trying to design it so that it has little or no knowledge of the Job objects.
With that in mind, I don't believe storing values in a config file will work
because 1) the web.config file does not allow you to save AppSettings, and 2)
the executing assembly must know about the parameters it's loading (it must
be recompiled each time a parameter is added).
I've thought of storing the parameters in a local data source (a flat-file
of some sort), which the executing assembly could load. The data source
would store the Job identifier, the parameter identifiers and values, and a
simple Update statement for updating the parameter values after a job is
complete. Other approaches I'm considering is storing a snippet of code that
the executing assembly would have to process (not sure if that's feasible),
or writting Jobs as assemblies that the executing assembly dynamically loads
based on a common interface found with Reflection.
Bottom line... I'm exploring my options and wondering how (if possible) to
connect to an XML file with OLE DB.
"Patrice" wrote:
The main problem is likely to write....
Another option would be to just use a dataset (that can be loaded/stored to
an xml file). Note though that this is likely valid if you don't have to
much data as it was never intended to be a replacement for databases...
Or perhaps the good old Xml API (or the LINQ to XML flavor) would be enough
(not sure what you want from that extra layer ?).
Also you have checked the config file option and for some reason decided not
to use this option ? (AFAIK you can also refer to antoher file from a config
file if you just want to keep this separate from your main config file).
As always it's better to give some details about what you are trying to do
(the kind and the number of settings you are trying to save would likely
help to raise better suggestion).
--
Patrice
"Jason Barnett" <JasonBarnett@xxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans le
message de groupe de discussion :
8F81FE52-AA43-48D3-9DF4-BED00842AE4E@xxxxxxxxxxxxxxxx
I would like to create an OleDb connection to an XML File, but I cannot
find
information about the connection string parameters. Is this possible?
I've got some parameters that an application uses and I have decided that
it
would be best to store it in a database-like storage area. I figured I
could
store the values in a CSV, XLS, or MDB file and maintain the parameters
through a OleDb connection. However, I wondered if I could use XML as
well.
I don't want to rely on a server connection and I don't want to load
anything
on the client.
For what it's worth, I'm using VS2005.
- Follow-Ups:
- Re: OleDb Connection to XML File
- From: sloan
- Re: OleDb Connection to XML File
- References:
- OleDb Connection to XML File
- From: Jason Barnett
- Re: OleDb Connection to XML File
- From: Patrice
- OleDb Connection to XML File
- Prev by Date: Re: Using SMO for SQL Server 2008 Express AND SQL Server 2005 Expr
- Next by Date: Winforms Data Access
- Previous by thread: Re: OleDb Connection to XML File
- Next by thread: Re: OleDb Connection to XML File
- Index(es):
Relevant Pages
|