Re: OleDb Connection to XML File

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.



.



Relevant Pages

  • Re: Persistence
    ... Why do you think OODB never succeeded? ... flexible way rather than complex assemblies, ... can use the same data store to support alternate assemblies, ... objects implemented in a programming language to XML documents ...
    (comp.object)
  • Re: How to create a new object.
    ... If I store the fullName instead of Type itself it worked fine. ... Will loading all the assemblies before trying to create the object cause any ... "James Curran" wrote: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Method info discovery using Reflection, variable argument list
    ... >> I'm developing a console app that loads dll assemblies at run time. ... spec then i store the method name. ... I will also store the ParamTypes array ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Passing Data Between Assemblies
    ... If the assemblies are in the same process then you can could ... > store it so that assembly B can access it without actually "passing" the ... > Reason why I am not storing the Connection String inside the App.config is ... > to pass this information into the business logic layer and then into the ...
    (microsoft.public.dotnet.languages.csharp)